woodpecker/model/config.go

19 lines
607 B
Go
Raw Normal View History

2016-05-02 19:21:25 +00:00
package model
2017-05-05 16:59:37 +00:00
// ConfigStore persists pipeline configuration to storage.
type ConfigStore interface {
ConfigLoad(int64) (*Config, error)
ConfigFind(*Repo, string) (*Config, error)
ConfigUpdate(*Config) error
ConfigInsert(*Config) error
2016-05-02 19:21:25 +00:00
}
2017-05-05 16:59:37 +00:00
// Config represents a pipeline configuration.
type Config struct {
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"`
Approved bool `json:"approved" meddler:"config_approved"`
2016-05-02 19:21:25 +00:00
}