2016-05-02 21:21:25 +02:00
|
|
|
package model
|
|
|
|
|
2017-05-05 18:59:37 +02:00
|
|
|
// ConfigStore persists pipeline configuration to storage.
|
|
|
|
type ConfigStore interface {
|
|
|
|
ConfigLoad(int64) (*Config, error)
|
|
|
|
ConfigFind(*Repo, string) (*Config, error)
|
2017-05-05 20:05:42 +02:00
|
|
|
ConfigFindApproved(*Config) (bool, error)
|
|
|
|
ConfigCreate(*Config) error
|
2016-05-02 21:21:25 +02:00
|
|
|
}
|
|
|
|
|
2017-05-05 18:59:37 +02:00
|
|
|
// Config represents a pipeline configuration.
|
|
|
|
type Config struct {
|
2017-05-05 20:05:42 +02:00
|
|
|
ID int64 `json:"-" meddler:"config_id,pk"`
|
|
|
|
RepoID int64 `json:"-" meddler:"config_repo_id"`
|
|
|
|
Data string `json:"data" meddler:"config_data"`
|
|
|
|
Hash string `json:"hash" meddler:"config_hash"`
|
2016-05-02 21:21:25 +02:00
|
|
|
}
|