woodpecker/model/config.go

18 lines
536 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)
2017-05-05 18:05:42 +00:00
ConfigFindApproved(*Config) (bool, error)
ConfigCreate(*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 {
2017-05-05 18:05:42 +00: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 19:21:25 +00:00
}