Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GITHUB_TOKEN = os.Getenv("GITHUB_TOKEN") REDIS_ADDR = os.Getenv("REDIS_ADDR") REDIS_PASSWORD = os.Getenv("REDIS_PASSWORD") MYSQL_URI = os.Getenv("MYSQL_URI") CDN_URL_BASE = os.Getenv("CDN_URL_BASE") )
View Source
var ( DefaultTriggerOwner = "gobuild" DefaultTriggerRepo = "travis-autobuild" )
View Source
var DB *xorm.Engine
Functions ¶
func GetRedisClient ¶
func TriggerTravisBuild ¶
Types ¶
type Repository ¶
type Repository struct { Id int64 `json:"id"` Owner string `xorm:"unique(nn)" json:"owner"` Repo string `xorm:"unique(nn)" json:"repo"` UserId int64 `xorm:"'user_id'" json:"-"` Refs []string `json:"refs"` // can be branch or tag Valid bool `json:"valid"` Official bool `json:"official"` Download uint64 `json:"download"` CreatedAt time.Time `xorm:"created" json:"created_at"` UpdatedAt time.Time `xorm:"updated" json:"updated_at"` TriggerAt time.Time `json:"trigger_at"` }
func (*Repository) AddBranch ¶
func (r *Repository) AddBranch(name string) error
type User ¶
type User struct { Id int64 `json:"id"` Name string `json:"name"` Email string `xorm:"unique" json:"email"` GithubToken string `xorm:"github_token" json:"-"` Admin bool `json:"admin"` CreatedAt time.Time `xorm:"created" json:"created_at"` UpdatedAt time.Time `xorm:"updated" json:"updated_at"` RepoUpdatedAt time.Time `json:"repo_updated_at"` }
func (*User) Repositories ¶
func (user *User) Repositories() ([]Repository, error)
func (*User) SyncGithub ¶
Click to show internal directories.
Click to hide internal directories.