Documentation ¶
Index ¶
- func Close()
- func DeleteBuild(id int64) error
- func DeleteCommit(id int64) error
- func DeleteMember(user, team int64) error
- func DeleteRepo(id int64) error
- func DeleteTeam(id int64) error
- func DeleteUser(id int64) error
- func FailUnfinishedBuilds() error
- func FailUnfinishedCommits() error
- func GetBranch(repo int64, branch string) (*Commit, error)
- func GetBuild(id int64) (*Build, error)
- func GetBuildSlug(slug string, commit int64) (*Build, error)
- func GetCommit(id int64) (*Commit, error)
- func GetCommitBranchHash(branch string, hash string, repo int64) (*Commit, error)
- func GetCommitHash(hash string, repo int64) (*Commit, error)
- func GetMember(user, team int64) (*Member, error)
- func GetPassEmail(email string) ([]byte, error)
- func GetRepo(id int64) (*Repo, error)
- func GetRepoSlug(slug string) (*Repo, error)
- func GetSettings() (*Settings, error)
- func GetTeam(id int64) (*Team, error)
- func GetTeamSlug(slug string) (*Team, error)
- func GetUser(id int64) (*User, error)
- func GetUserEmail(email string) (*User, error)
- func Init(name, datasource string) error
- func IsMember(user, team int64) (bool, error)
- func IsMemberAdmin(user, team int64) (bool, error)
- func IsRepoAdmin(user *User, repo *Repo) (bool, error)
- func ListBranches(repo int64) ([]*Commit, error)
- func ListBuilds(id int64) ([]*Build, error)
- func ListCommits(repo int64, branch string) ([]*Commit, error)
- func ListCommitsTeam(team int64) ([]*RepoCommit, error)
- func ListCommitsUser(user int64) ([]*RepoCommit, error)
- func ListMembers(team int64) ([]*Member, error)
- func ListRepos(id int64) ([]*Repo, error)
- func ListReposTeam(id int64) ([]*Repo, error)
- func ListTeams(id int64) ([]*Team, error)
- func ListUsers() ([]*User, error)
- func ListUsersRange(limit, offset int) ([]*User, error)
- func SaveBuild(build *Build) error
- func SaveCommit(commit *Commit) error
- func SaveMember(user, team int64, role string) error
- func SaveRepo(repo *Repo) error
- func SaveSettings(settings *Settings) error
- func SaveTeam(team *Team) error
- func SaveUser(user *User) error
- func SettingsMust() *Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteRepo ¶
Deletes an existing Repository. TODO need to delete builds too.
func FailUnfinishedBuilds ¶ added in v0.2.1
func FailUnfinishedBuilds() error
FailUnfinishedBuilds sets status=Failure to all builds in the Pending and Started states
func FailUnfinishedCommits ¶ added in v0.2.1
func FailUnfinishedCommits() error
func GetBuildSlug ¶
Returns the Build with the given slug.
func GetCommitBranchHash ¶ added in v0.2.1
Returns the Commit on the given branch with the given hash.
func GetCommitHash ¶
Returns the Commit with the given hash.
func GetPassEmail ¶
Returns the User Password Hash for the given email address.
func GetRepoSlug ¶
Returns the Repo with the given slug.
func GetTeamSlug ¶
Returns the Team with the given slug.
func GetUserEmail ¶
Returns the User with the given email address.
func Init ¶ added in v0.2.1
Init connects to database and performs migration if necessary.
Database driver name and data source information is provided by user from within command line, and error checking is deferred to sql.Open.
Init will just bail out and returns error if driver name is not listed, no fallback nor default driver sets here.
func IsMemberAdmin ¶
Returns true is the user is an admin member of the team.
func IsRepoAdmin ¶ added in v0.2.1
Checks whether a user is admin of a repo Returns true if user owns repo or is on team that owns repo Returns true if the user is an admin member of the team.
func ListBranches ¶
Returns a list of the most recent commits for each branch.
func ListBuilds ¶
Returns a list of all Builds associated with the specified Commit ID and branch.
func ListCommits ¶
Returns a list of all Commits associated with the specified Repo ID.
func ListCommitsTeam ¶
Returns a list of recent Commits associated with the specified Team ID
func ListCommitsUser ¶
Returns a list of recent Commits associated with the specified User ID
func ListMembers ¶
Returns a list of all Team members.
func ListReposTeam ¶
Returns a list of all Repos associated with the specified Team ID.
func ListUsersRange ¶
Returns a list of Users within the specified range (for pagination purposes).
func SettingsMust ¶
func SettingsMust() *Settings
Returns the system Settings. This is expected always pass, and will panic on failure.
Types ¶
This section is empty.