Documentation ¶
Index ¶
- func DeactivateRepo(c web.C, w http.ResponseWriter, r *http.Request)
- func DelRepo(c web.C, w http.ResponseWriter, r *http.Request)
- func DelUser(c web.C, w http.ResponseWriter, r *http.Request)
- func DelWorker(c web.C, w http.ResponseWriter, r *http.Request)
- func GetBadge(c web.C, w http.ResponseWriter, r *http.Request)
- func GetCC(c web.C, w http.ResponseWriter, r *http.Request)
- func GetCommit(c web.C, w http.ResponseWriter, r *http.Request)
- func GetCommitList(c web.C, w http.ResponseWriter, r *http.Request)
- func GetLogin(c web.C, w http.ResponseWriter, r *http.Request)
- func GetLoginList(c web.C, w http.ResponseWriter, r *http.Request)
- func GetOutput(c web.C, w http.ResponseWriter, r *http.Request)
- func GetRepo(c web.C, w http.ResponseWriter, r *http.Request)
- func GetUser(c web.C, w http.ResponseWriter, r *http.Request)
- func GetUserActivity(c web.C, w http.ResponseWriter, r *http.Request)
- func GetUserCurrent(c web.C, w http.ResponseWriter, r *http.Request)
- func GetUserFeed(c web.C, w http.ResponseWriter, r *http.Request)
- func GetUserList(c web.C, w http.ResponseWriter, r *http.Request)
- func GetUserRepos(c web.C, w http.ResponseWriter, r *http.Request)
- func GetWorkAssigned(c web.C, w http.ResponseWriter, r *http.Request)
- func GetWorkPending(c web.C, w http.ResponseWriter, r *http.Request)
- func GetWorkStarted(c web.C, w http.ResponseWriter, r *http.Request)
- func GetWorkers(c web.C, w http.ResponseWriter, r *http.Request)
- func PostCommit(c web.C, w http.ResponseWriter, r *http.Request)
- func PostHook(c web.C, w http.ResponseWriter, r *http.Request)
- func PostRepo(c web.C, w http.ResponseWriter, r *http.Request)
- func PostUser(c web.C, w http.ResponseWriter, r *http.Request)
- func PostUserSync(c web.C, w http.ResponseWriter, r *http.Request)
- func PostWorker(c web.C, w http.ResponseWriter, r *http.Request)
- func PutRepo(c web.C, w http.ResponseWriter, r *http.Request)
- func PutUser(c web.C, w http.ResponseWriter, r *http.Request)
- func ToLimit(r *http.Request) int
- func ToOffset(r *http.Request) int
- func ToRepo(c web.C) *model.Repo
- func ToRole(c web.C) *model.Perm
- func ToUser(c web.C) *model.User
- func WsConsole(c web.C, w http.ResponseWriter, r *http.Request)
- func WsUser(c web.C, w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeactivateRepo ¶
DeactivateRepo accepts a request to deactivate the named repository. This will disable all builds in the system for this repository.
POST /api/repos/:host/:owner/:name/deactivate
func DelRepo ¶
DelRepo accepts a request to delete the named repository.
DEL /api/repos/:host/:owner/:name
func DelUser ¶
DeleteUser accepts a request to delete the specified user account from the system. A successful request will respond with an OK 200 status.
DELETE /api/users/:host/:login
func GetBadge ¶
GetBadge accepts a request to retrieve the named repo and branhes latest build details from the datastore and return an SVG badges representing the build results.
GET /api/badge/:host/:owner/:name/status.svg
func GetCC ¶
GetCC accepts a request to retrieve the latest build status for the given repository from the datastore and in CCTray XML format.
GET /api/badge/:host/:owner/:name/cc.xml
func GetCommit ¶
GetCommit accepts a request to retrieve a commit from the datastore for the given repository, branch and commit hash.
GET /api/repos/:host/:owner/:name/branches/:branch/commits/:commit
func GetCommitList ¶
GetCommitList accepts a request to retrieve a list of recent commits by Repo, and retur in JSON format.
GET /api/repos/:host/:owner/:name/commits?limit=:limit&offset=:offset
func GetLogin ¶
GetLogin accepts a request to authorize the user and to return a valid OAuth2 access token. The access token is returned as url segment #access_token
GET /login/:host
func GetLoginList ¶
GetLoginList accepts a request to retrive a list of all OAuth login options.
GET /api/remotes/login
func GetOutput ¶
GetOutput gets the commit's stdout.
GET /api/repos/:host/:owner/:name/branches/:branch/commits/:commit/console
func GetRepo ¶
GetRepo accepts a request to retrieve a commit from the datastore for the given repository, branch and commit hash.
GET /api/repos/:host/:owner/:name
func GetUser ¶
GetUser accepts a request to retrieve a user by hostname and login from the datastore and return encoded in JSON format.
GET /api/users/:host/:login
func GetUserActivity ¶
GetUserActivity accepts a request to get the user's latest build activity, across all repositories, from the datastore. The results are encoded and returned in JSON format.
GET /api/user/activity?limit=:limit&offset=:offset
func GetUserCurrent ¶
GetUserCurrent accepts a request to retrieve the currently authenticated user from the datastore and return in JSON format.
GET /api/user
func GetUserFeed ¶
GetUserFeed accepts a request to get the user's latest build feed, across all repositories, from the datastore. The results are encoded and returned in JSON format.
GET /api/user/feed
func GetUserList ¶
GetUsers accepts a request to retrieve all users from the datastore and return encoded in JSON format.
GET /api/users
func GetUserRepos ¶
GetRepos accepts a request to get the currently authenticated user's repository list from the datastore, encoded and returned in JSON format.
GET /api/user/repos
func GetWorkAssigned ¶
GetWorkAssigned accepts a request to retrieve the list of started work and returns in JSON format.
GET /api/work/assignments
func GetWorkPending ¶
GetWorkPending accepts a request to retrieve the list of pending work and returns in JSON format.
GET /api/work/pending
func GetWorkStarted ¶
GetWorkStarted accepts a request to retrieve the list of started work and returns in JSON format.
GET /api/work/started
func GetWorkers ¶
GetWorkers accepts a request to retrieve the list of registered workers and return the results in JSON format.
GET /api/workers
func PostCommit ¶
PostHook accepts a post-commit hook and parses the payload in order to trigger a build. The payload is specified to the remote system (ie GitHub) and will therefore get parsed by the appropriate remote plugin.
POST /api/repos/{host}/{owner}/{name}/branches/{branch}/commits/{commit}
func PostHook ¶
PostHook accepts a post-commit hook and parses the payload in order to trigger a build. The payload is specified to the remote system (ie GitHub) and will therefore get parsed by the appropriate remote plugin.
GET /api/hook/:host
func PostRepo ¶
PostRepo accapets a request to activate the named repository in the datastore. It returns a 201 status created if successful
POST /api/repos/:host/:owner/:name
func PostUser ¶
PostUser accepts a request to create a new user in the system. The created user account is returned in JSON format if successful.
POST /api/users/:host/:login
func PostWorker ¶
PostWorker accepts a request to allocate a new worker to the pool.
POST /api/workers
func PutRepo ¶
PutRepo accapets a request to update the named repository in the datastore. It expects a JSON input and returns the updated repository in JSON format if successful.
PUT /api/repos/:host/:owner/:name
func PutUser ¶
PutUser accepts a request to update the currently authenticated User profile.
PUT /api/user
func ToLimit ¶
ToLimit returns the Limit from current request query if limit doesn't present set default offset equal to 20, maximum limit equal 100
func ToOffset ¶
ToOffset returns the Offset from current request query if offset doesn't present set default offset equal to 0
func ToRepo ¶
ToRepo returns the Repo from the current request context. If the Repo does not exist a nil value is returned.
func ToRole ¶
ToRole returns the Role from the current request context. If the Role does not exist a nil value is returned.
func ToUser ¶
ToUser returns the User from the current request context. If the User does not exist a nil value is returned.
Types ¶
This section is empty.