Documentation ¶
Index ¶
- 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
- type JobStore
- type KeyStore
- type LogStore
- type NodeStore
- type RepoStore
- type Setter
- type Store
- type UserStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBuild ¶
func GetBuildCommit ¶
func GetBuildLast ¶
func GetBuildLastBefore ¶
func GetBuildNumber ¶
func GetBuildRef ¶
func GetJobNumber ¶
func GetRepoListOf ¶
func GetRepoOwnerName ¶
func GetUserFeed ¶
Types ¶
type BuildStore ¶
type BuildStore interface { // Get gets a build by unique ID. Get(int64) (*model.Build, error) // GetNumber gets a build by number. GetNumber(*model.Repo, int) (*model.Build, error) // GetRef gets a build by its ref. GetRef(*model.Repo, string) (*model.Build, error) // GetCommit gets a build by its commit sha. GetCommit(*model.Repo, string, string) (*model.Build, error) // GetLast gets the last build for the branch. GetLast(*model.Repo, string) (*model.Build, error) // GetLastBefore gets the last build before build number N. GetLastBefore(*model.Repo, string, int64) (*model.Build, error) // GetList gets a list of builds for the repository GetList(*model.Repo) ([]*model.Build, error) // Create creates a new build and jobs. Create(*model.Build, ...*model.Job) error // Update updates a build. Update(*model.Build) error }
type JobStore ¶
type JobStore interface { // Get gets a job by unique ID. Get(int64) (*model.Job, error) // GetNumber gets a job by number. GetNumber(*model.Build, int) (*model.Job, error) // GetList gets a list of all users in the system. GetList(*model.Build) ([]*model.Job, error) // Create creates a job. Create(*model.Job) error // Update updates a job. Update(*model.Job) error }
type NodeStore ¶
type NodeStore interface { // Get gets a user by unique ID. Get(int64) (*model.Node, error) // GetList gets a list of all nodes in the system. GetList() ([]*model.Node, error) // Count gets a count of all nodes in the system. Count() (int, error) // Create creates a node. Create(*model.Node) error // Update updates a node. Update(*model.Node) error // Delete deletes a node. Delete(*model.Node) error }
type RepoStore ¶
type RepoStore interface { // Get gets a repo by unique ID. Get(int64) (*model.Repo, error) // GetLogin gets a repo by its full name. GetName(string) (*model.Repo, error) // GetListOf gets the list of enumerated repos in the system. GetListOf([]*model.RepoLite) ([]*model.Repo, error) // Count gets a count of all repos in the system. Count() (int, error) // Create creates a new repository. Create(*model.Repo) error // Update updates a user repository. Update(*model.Repo) error // Delete deletes a user repository. Delete(*model.Repo) error }
type Setter ¶
type Setter interface {
Set(string, interface{})
}
Setter defines a context that enables setting values.
type Store ¶
type Store interface { Nodes() NodeStore Users() UserStore Repos() RepoStore Keys() KeyStore Builds() BuildStore Jobs() JobStore Logs() LogStore }
func FromContext ¶
FromContext returns the Store associated with this context.
type UserStore ¶
type UserStore interface { // Get gets a user by unique ID. Get(int64) (*model.User, error) // GetLogin gets a user by unique Login name. GetLogin(string) (*model.User, error) // GetList gets a list of all users in the system. GetList() ([]*model.User, error) // GetFeed gets a user activity feed. GetFeed([]*model.RepoLite) ([]*model.Feed, error) // Count gets a count of all users in the system. Count() (int, error) // Create creates a new user account. Create(*model.User) error // Update updates a user account. Update(*model.User) error // Delete deletes a user account. Delete(*model.User) error }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.