Versions in this module Expand all Collapse all v0 v0.4.0 Oct 26, 2015 Changes in this version + func CountNodes(c context.Context) (int, error) + func CountRepos(c context.Context) (int, error) + func CountUsers(c context.Context) (int, error) + func CreateBuild(c context.Context, build *model.Build, jobs ...*model.Job) error + func CreateJob(c context.Context, job *model.Job) error + func CreateKey(c context.Context, key *model.Key) error + func CreateNode(c context.Context, node *model.Node) error + func CreateRepo(c context.Context, repo *model.Repo) error + func CreateUser(c context.Context, user *model.User) error + func DeleteKey(c context.Context, key *model.Key) error + func DeleteNode(c context.Context, node *model.Node) error + func DeleteRepo(c context.Context, repo *model.Repo) error + func DeleteUser(c context.Context, user *model.User) error + func GetBuild(c context.Context, id int64) (*model.Build, error) + func GetBuildCommit(c context.Context, repo *model.Repo, sha, branch string) (*model.Build, error) + func GetBuildLast(c context.Context, repo *model.Repo, branch string) (*model.Build, error) + func GetBuildLastBefore(c context.Context, repo *model.Repo, branch string, number int64) (*model.Build, error) + func GetBuildList(c context.Context, repo *model.Repo) ([]*model.Build, error) + func GetBuildNumber(c context.Context, repo *model.Repo, num int) (*model.Build, error) + func GetBuildRef(c context.Context, repo *model.Repo, ref string) (*model.Build, error) + func GetJob(c context.Context, id int64) (*model.Job, error) + func GetJobList(c context.Context, build *model.Build) ([]*model.Job, error) + func GetJobNumber(c context.Context, build *model.Build, num int) (*model.Job, error) + func GetKey(c context.Context, repo *model.Repo) (*model.Key, error) + func GetNode(c context.Context, id int64) (*model.Node, error) + func GetNodeList(c context.Context) ([]*model.Node, error) + func GetRepo(c context.Context, id int64) (*model.Repo, error) + func GetRepoListOf(c context.Context, listof []*model.RepoLite) ([]*model.Repo, error) + func GetRepoName(c context.Context, name string) (*model.Repo, error) + func GetRepoOwnerName(c context.Context, owner, name string) (*model.Repo, error) + func GetUser(c context.Context, id int64) (*model.User, error) + func GetUserFeed(c context.Context, listof []*model.RepoLite) ([]*model.Feed, error) + func GetUserList(c context.Context) ([]*model.User, error) + func GetUserLogin(c context.Context, login string) (*model.User, error) + func ReadLog(c context.Context, job *model.Job) (io.ReadCloser, error) + func ToContext(c Setter, store Store) + func UpdateBuild(c context.Context, build *model.Build) error + func UpdateJob(c context.Context, job *model.Job) error + func UpdateKey(c context.Context, key *model.Key) error + func UpdateNode(c context.Context, node *model.Node) error + func UpdateRepo(c context.Context, repo *model.Repo) error + func UpdateUser(c context.Context, user *model.User) error + func WriteLog(c context.Context, job *model.Job, r io.Reader) error + type BuildStore interface + Create func(*model.Build, ...*model.Job) error + Get func(int64) (*model.Build, error) + GetCommit func(*model.Repo, string, string) (*model.Build, error) + GetLast func(*model.Repo, string) (*model.Build, error) + GetLastBefore func(*model.Repo, string, int64) (*model.Build, error) + GetList func(*model.Repo) ([]*model.Build, error) + GetNumber func(*model.Repo, int) (*model.Build, error) + GetRef func(*model.Repo, string) (*model.Build, error) + Update func(*model.Build) error + type JobStore interface + Create func(*model.Job) error + Get func(int64) (*model.Job, error) + GetList func(*model.Build) ([]*model.Job, error) + GetNumber func(*model.Build, int) (*model.Job, error) + Update func(*model.Job) error + type KeyStore interface + Create func(*model.Key) error + Delete func(*model.Key) error + Get func(*model.Repo) (*model.Key, error) + Update func(*model.Key) error + type LogStore interface + Read func(*model.Job) (io.ReadCloser, error) + Write func(*model.Job, io.Reader) error + type NodeStore interface + Count func() (int, error) + Create func(*model.Node) error + Delete func(*model.Node) error + Get func(int64) (*model.Node, error) + GetList func() ([]*model.Node, error) + Update func(*model.Node) error + type RepoStore interface + Count func() (int, error) + Create func(*model.Repo) error + Delete func(*model.Repo) error + Get func(int64) (*model.Repo, error) + GetListOf func([]*model.RepoLite) ([]*model.Repo, error) + GetName func(string) (*model.Repo, error) + Update func(*model.Repo) error + type Setter interface + Set func(string, interface{}) + type Store interface + Builds func() BuildStore + Jobs func() JobStore + Keys func() KeyStore + Logs func() LogStore + Nodes func() NodeStore + Repos func() RepoStore + Users func() UserStore + func FromContext(c context.Context) Store + func New(nodes NodeStore, users UserStore, repos RepoStore, keys KeyStore, ...) Store + type UserStore interface + Count func() (int, error) + Create func(*model.User) error + Delete func(*model.User) error + Get func(int64) (*model.User, error) + GetFeed func([]*model.RepoLite) ([]*model.Feed, error) + GetList func() ([]*model.User, error) + GetLogin func(string) (*model.User, error) + Update func(*model.User) error