Documentation ¶
Index ¶
- Constants
- func AddBuild(projectName string, branch string, commit string, commitTime time.Time, ...) error
- func AddBuildWithProject(project Project) error
- func AddGithubBuild(projectId int64, data githubutil.GithubPushHook) error
- func AddGitlabBuild(projectId int64, data gitlabutil.GitlabPushHook) error
- func AddProject(project Project) error
- func AddProjectWithNameUrl(projectName string, repoUrl string) error
- func ReadOrCreateProject(userName string, projectName string, repoUrl string) (int64, error)
- func RegisterModels()
- type Build
- type Project
- type Worker
Constants ¶
View Source
const ( BUILD_STATUS_NOT_START = 0 BUILD_STATUS_BUILDING = 1 BUILD_STATUS_SUCCESS = 2 BUILD_STATUS_FAIL = 3 BUILD_STATUS_CANCELED = 4 )
View Source
const ( PROJECT_STATUS_NEED_TEST = 0 PROJECT_STATUS_TESTING = 1 PROJECT_STATUS_SUCCESS = 2 PROJECT_STATUS_FAIL = 3 )
View Source
const ( WORKER_STATUS_IDLE = 0 WORKER_STATUS_BUSY = 1 WORKER_STATUS_DIE = 2 )
Variables ¶
This section is empty.
Functions ¶
func AddBuildWithProject ¶
func AddGithubBuild ¶
func AddGithubBuild(projectId int64, data githubutil.GithubPushHook) error
func AddGitlabBuild ¶
func AddGitlabBuild(projectId int64, data gitlabutil.GitlabPushHook) error
func AddProject ¶
func AddProjectWithNameUrl ¶
For more usage in http://beego.me/docs/mvc/model/overview.md
func ReadOrCreateProject ¶
Read or create the project in database
func RegisterModels ¶
func RegisterModels()
Types ¶
type Build ¶
type Build struct { Id int64 `orm:"pk;auto"` ProjectId int64 UserName string `orm:"size(1024);null"` ProjectName string `orm:"size(1024);null"` RepoUrl string `orm:"size(1024);null"` Branch string `orm:"size(1024);null"` Commit string `orm:"size(1024);null"` CommitTime time.Time `orm:"null"` Committer string `orm:"size(1024);null"` BuildTime time.Time `orm:"null"` FinishTime time.Time `orm:"null"` Worker string `orm:"size(1024);null"` Status int `orm:"null"` }
func GetAllBuilds ¶
func GetAllBuilds() []*Build
func GetBuildWithId ¶
type Project ¶
type Project struct { Id int64 `orm:"pk;auto"` UserName string `orm:"size(1024);null"` ProjectName string `orm:"size(1024);null"` RepoUrl string `orm:"size(1024);null"` Status int `orm:"null"` }
More setting in http://beego.me/docs/mvc/model/models.md
func GetAllProjects ¶
func GetAllProjects() []*Project
For advanced usage in http://beego.me/docs/mvc/model/query.md#all
func GetProjectWithId ¶
Click to show internal directories.
Click to hide internal directories.