Documentation ¶
Index ¶
- func AdminSettings(w http.ResponseWriter, r *http.Request, u *User) error
- func AdminSettingsUpdate(w http.ResponseWriter, r *http.Request, u *User) error
- func AdminUserAdd(w http.ResponseWriter, r *http.Request, u *User) error
- func AdminUserDelete(w http.ResponseWriter, r *http.Request, u *User) error
- func AdminUserEdit(w http.ResponseWriter, r *http.Request, u *User) error
- func AdminUserInvite(w http.ResponseWriter, r *http.Request, u *User) error
- func AdminUserList(w http.ResponseWriter, r *http.Request, u *User) error
- func AdminUserUpdate(w http.ResponseWriter, r *http.Request, u *User) error
- func Authorize(w http.ResponseWriter, r *http.Request) error
- func Badge(w http.ResponseWriter, r *http.Request) error
- func BuildOut(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
- func BuildOutGzip(w http.ResponseWriter, r *http.Request, u *User) error
- func BuildStatus(w http.ResponseWriter, r *http.Request, repo *Repo) error
- func CommitShow(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
- func DelCookie(w http.ResponseWriter, r *http.Request, name string)
- func Forgot(w http.ResponseWriter, r *http.Request) error
- func ForgotPost(w http.ResponseWriter, r *http.Request) error
- func GetCookie(r *http.Request, name string) string
- func Index(w http.ResponseWriter, r *http.Request) error
- func Install(w http.ResponseWriter, r *http.Request) error
- func InstallPost(w http.ResponseWriter, r *http.Request) error
- func IsHttps(r *http.Request) bool
- func LinkBitbucket(w http.ResponseWriter, r *http.Request, u *User) error
- func LinkGithub(w http.ResponseWriter, r *http.Request, u *User) error
- func Login(w http.ResponseWriter, r *http.Request) error
- func Logout(w http.ResponseWriter, r *http.Request) error
- func Register(w http.ResponseWriter, r *http.Request) error
- func RegisterPost(w http.ResponseWriter, r *http.Request) error
- func RenderError(w http.ResponseWriter, err error, code int) error
- func RenderForbidden(w http.ResponseWriter) error
- func RenderJson(w http.ResponseWriter, data interface{}) error
- func RenderNotFound(w http.ResponseWriter) error
- func RenderTemplate(w http.ResponseWriter, name string, data interface{}) error
- func RenderText(w http.ResponseWriter, text string, code int) error
- func RepoAddBitbucket(w http.ResponseWriter, r *http.Request, u *User) error
- func RepoAddGithub(w http.ResponseWriter, r *http.Request, u *User) error
- func RepoBadges(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
- func RepoCreateBitbucket(w http.ResponseWriter, r *http.Request, u *User) error
- func RepoCreateGithub(w http.ResponseWriter, r *http.Request, u *User) error
- func RepoDashboard(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
- func RepoDelete(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
- func RepoDeleteForm(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
- func RepoKeys(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
- func RepoParamsForm(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
- func RepoSettingsForm(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
- func RepoUpdate(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
- func Reset(w http.ResponseWriter, r *http.Request) error
- func ResetPost(w http.ResponseWriter, r *http.Request) error
- func SetCookie(w http.ResponseWriter, r *http.Request, name, value string)
- func SignUp(w http.ResponseWriter, r *http.Request) error
- func SignUpPost(w http.ResponseWriter, r *http.Request) error
- func TeamAdd(w http.ResponseWriter, r *http.Request, u *User) error
- func TeamCreate(w http.ResponseWriter, r *http.Request, u *User) error
- func TeamDelete(w http.ResponseWriter, r *http.Request, u *User) error
- func TeamDeleteConfirm(w http.ResponseWriter, r *http.Request, u *User) error
- func TeamEdit(w http.ResponseWriter, r *http.Request, u *User) error
- func TeamMemberAccept(w http.ResponseWriter, r *http.Request, u *User) error
- func TeamMemberAdd(w http.ResponseWriter, r *http.Request, u *User) error
- func TeamMemberDelete(w http.ResponseWriter, r *http.Request, u *User) error
- func TeamMemberEdit(w http.ResponseWriter, r *http.Request, u *User) error
- func TeamMemberInvite(w http.ResponseWriter, r *http.Request, u *User) error
- func TeamMemberUpdate(w http.ResponseWriter, r *http.Request, u *User) error
- func TeamMembers(w http.ResponseWriter, r *http.Request, u *User) error
- func TeamShow(w http.ResponseWriter, r *http.Request, u *User) error
- func TeamUpdate(w http.ResponseWriter, r *http.Request, u *User) error
- func UserDelete(w http.ResponseWriter, r *http.Request, u *User) error
- func UserDeleteConfirm(w http.ResponseWriter, r *http.Request, u *User) error
- func UserEdit(w http.ResponseWriter, r *http.Request, u *User) error
- func UserInvite(w http.ResponseWriter, r *http.Request) error
- func UserPass(w http.ResponseWriter, r *http.Request, u *User) error
- func UserPassUpdate(w http.ResponseWriter, r *http.Request, u *User) error
- func UserShow(w http.ResponseWriter, r *http.Request, u *User) error
- func UserTeams(w http.ResponseWriter, r *http.Request, u *User) error
- func UserUpdate(w http.ResponseWriter, r *http.Request, u *User) error
- type AdminHandler
- type BitbucketHandler
- type BuildResult
- type CommitRebuildHandler
- type ErrorHandler
- type GithubHandler
- type GitlabHandler
- func (g *GitlabHandler) Add(w http.ResponseWriter, r *http.Request, u *User) error
- func (g *GitlabHandler) Create(w http.ResponseWriter, r *http.Request, u *User) error
- func (g *GitlabHandler) Hook(w http.ResponseWriter, r *http.Request) error
- func (g *GitlabHandler) Link(w http.ResponseWriter, r *http.Request, u *User) error
- func (g *GitlabHandler) PullRequestHook(p *gogitlab.HookPayload, repo *Repo, user *User) error
- func (g *GitlabHandler) ReLink(w http.ResponseWriter, r *http.Request, u *User) error
- type PublicHandler
- type RepoAdminHandler
- type RepoHandler
- type UserHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminSettings ¶
func AdminSettings(w http.ResponseWriter, r *http.Request, u *User) error
Return an HTML form for the User to update the site settings.
func AdminSettingsUpdate ¶
func AdminSettingsUpdate(w http.ResponseWriter, r *http.Request, u *User) error
func AdminUserAdd ¶
func AdminUserAdd(w http.ResponseWriter, r *http.Request, u *User) error
Invite a user to join the system
func AdminUserDelete ¶
func AdminUserDelete(w http.ResponseWriter, r *http.Request, u *User) error
func AdminUserEdit ¶
func AdminUserEdit(w http.ResponseWriter, r *http.Request, u *User) error
Form to edit a user
func AdminUserInvite ¶
func AdminUserInvite(w http.ResponseWriter, r *http.Request, u *User) error
Invite a user to join the system
func AdminUserList ¶
func AdminUserList(w http.ResponseWriter, r *http.Request, u *User) error
Display a list of ALL users in the system
func AdminUserUpdate ¶
func AdminUserUpdate(w http.ResponseWriter, r *http.Request, u *User) error
func Authorize ¶
func Authorize(w http.ResponseWriter, r *http.Request) error
Create the User session.
func Badge ¶
func Badge(w http.ResponseWriter, r *http.Request) error
Display a static badge (svg format) for a specific repository and an optional branch. TODO this needs to implement basic caching
func BuildOut ¶
func BuildOut(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
Returns the combined stdout / stderr for an individual Build.
func BuildOutGzip ¶
func BuildOutGzip(w http.ResponseWriter, r *http.Request, u *User) error
Returns the gzipped stdout / stderr for an individual Build
func BuildStatus ¶ added in v0.2.1
func BuildStatus(w http.ResponseWriter, r *http.Request, repo *Repo) error
Returns the combined stdout / stderr for an individual Build.
func CommitShow ¶
func CommitShow(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
Display a specific Commit.
func DelCookie ¶
func DelCookie(w http.ResponseWriter, r *http.Request, name string)
DelCookie deletes a secure cookie.
func Forgot ¶
func Forgot(w http.ResponseWriter, r *http.Request) error
Return an HTML form for the User to request a password reset.
func ForgotPost ¶
func ForgotPost(w http.ResponseWriter, r *http.Request) error
func Index ¶
func Index(w http.ResponseWriter, r *http.Request) error
Returns an HTML index.html page if the user is not currently authenticated, otherwise redirects the user to their personal dashboard screen
func InstallPost ¶
func InstallPost(w http.ResponseWriter, r *http.Request) error
func LinkBitbucket ¶ added in v0.2.1
func LinkBitbucket(w http.ResponseWriter, r *http.Request, u *User) error
func LinkGithub ¶
func LinkGithub(w http.ResponseWriter, r *http.Request, u *User) error
func Login ¶
func Login(w http.ResponseWriter, r *http.Request) error
Return an HTML form for the User to login.
func Register ¶
func Register(w http.ResponseWriter, r *http.Request) error
Return an HTML form to register for a new account. This page must be visited from a Signup email that contains a hash to verify the Email address is correct.
func RegisterPost ¶
func RegisterPost(w http.ResponseWriter, r *http.Request) error
func RenderError ¶
func RenderError(w http.ResponseWriter, err error, code int) error
RenderError renders a text representation of the Error message.
func RenderForbidden ¶
func RenderForbidden(w http.ResponseWriter) error
Renders the 403 template for the specified data type and write the output to the http.ResponseWriter.
func RenderJson ¶
func RenderJson(w http.ResponseWriter, data interface{}) error
RenderJson renders a JSON representation of resource v and writes to the http.ResposneWriter.
func RenderNotFound ¶
func RenderNotFound(w http.ResponseWriter) error
Renders the 404 template for the specified data type and write the output to the http.ResponseWriter.
func RenderTemplate ¶
func RenderTemplate(w http.ResponseWriter, name string, data interface{}) error
Renders the named template for the specified data type and write the output to the http.ResponseWriter.
func RenderText ¶
func RenderText(w http.ResponseWriter, text string, code int) error
RenderText write the plain text string to the http.ResposneWriter.
func RepoAddBitbucket ¶ added in v0.2.1
func RepoAddBitbucket(w http.ResponseWriter, r *http.Request, u *User) error
func RepoAddGithub ¶ added in v0.2.1
func RepoAddGithub(w http.ResponseWriter, r *http.Request, u *User) error
func RepoBadges ¶
func RepoBadges(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
func RepoCreateBitbucket ¶ added in v0.2.1
func RepoCreateBitbucket(w http.ResponseWriter, r *http.Request, u *User) error
func RepoCreateGithub ¶
func RepoCreateGithub(w http.ResponseWriter, r *http.Request, u *User) error
func RepoDashboard ¶
func RepoDashboard(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
Display a Repository dashboard.
func RepoDelete ¶
func RepoDelete(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
Deletes a specific repository.
func RepoDeleteForm ¶
func RepoDeleteForm(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
Deletes a specific repository.
func RepoParamsForm ¶
func RepoParamsForm(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
Repository Params (YAML parameters) Form
func RepoSettingsForm ¶
func RepoSettingsForm(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
Repository Settings
func RepoUpdate ¶
func RepoUpdate(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
Updates an existing repository.
func Reset ¶
func Reset(w http.ResponseWriter, r *http.Request) error
Return an HTML form for the User to perform a password reset. This page must be visited from a Password Reset email that contains a hash to verify the User's identity.
func SetCookie ¶
func SetCookie(w http.ResponseWriter, r *http.Request, name, value string)
SetCookie signs and writes the cookie value.
func SignUp ¶
func SignUp(w http.ResponseWriter, r *http.Request) error
Return an HTML form for the User to signup.
func SignUpPost ¶
func SignUpPost(w http.ResponseWriter, r *http.Request) error
func TeamAdd ¶
func TeamAdd(w http.ResponseWriter, r *http.Request, u *User) error
Return an HTML form for creating a Team.
func TeamCreate ¶
func TeamCreate(w http.ResponseWriter, r *http.Request, u *User) error
Create a new Team.
func TeamDelete ¶
func TeamDelete(w http.ResponseWriter, r *http.Request, u *User) error
Delete a specific Team.
func TeamDeleteConfirm ¶
func TeamDeleteConfirm(w http.ResponseWriter, r *http.Request, u *User) error
Delete Confirmation Page
func TeamEdit ¶
func TeamEdit(w http.ResponseWriter, r *http.Request, u *User) error
Return an HTML form for editing a Team.
func TeamMemberAccept ¶
func TeamMemberAccept(w http.ResponseWriter, r *http.Request, u *User) error
func TeamMemberAdd ¶
func TeamMemberAdd(w http.ResponseWriter, r *http.Request, u *User) error
Return an HTML form for creating a new Team Member.
func TeamMemberDelete ¶
func TeamMemberDelete(w http.ResponseWriter, r *http.Request, u *User) error
Delete a specific Team Member.
func TeamMemberEdit ¶
func TeamMemberEdit(w http.ResponseWriter, r *http.Request, u *User) error
Return an HTML form for editing a Team Member.
func TeamMemberInvite ¶
func TeamMemberInvite(w http.ResponseWriter, r *http.Request, u *User) error
Invite a new Team Member.
func TeamMemberUpdate ¶
func TeamMemberUpdate(w http.ResponseWriter, r *http.Request, u *User) error
Update a specific Team Member.
func TeamMembers ¶
func TeamMembers(w http.ResponseWriter, r *http.Request, u *User) error
Display a list of Team Members.
func TeamShow ¶
func TeamShow(w http.ResponseWriter, r *http.Request, u *User) error
Display a specific Team.
func TeamUpdate ¶
func TeamUpdate(w http.ResponseWriter, r *http.Request, u *User) error
Update a specific Team.
func UserDelete ¶
func UserDelete(w http.ResponseWriter, r *http.Request, u *User) error
delete a specific user.
func UserDeleteConfirm ¶
func UserDeleteConfirm(w http.ResponseWriter, r *http.Request, u *User) error
return an HTML form for deleting a user.
func UserEdit ¶
func UserEdit(w http.ResponseWriter, r *http.Request, u *User) error
return an HTML form for editing a user
func UserInvite ¶
func UserInvite(w http.ResponseWriter, r *http.Request) error
func UserPass ¶
func UserPass(w http.ResponseWriter, r *http.Request, u *User) error
return an HTML form for editing a user password
func UserPassUpdate ¶
func UserPassUpdate(w http.ResponseWriter, r *http.Request, u *User) error
update a specific user's password
func UserShow ¶
func UserShow(w http.ResponseWriter, r *http.Request, u *User) error
Display the dashboard for a specific user
func UserTeams ¶
func UserTeams(w http.ResponseWriter, r *http.Request, u *User) error
Display a list of all Teams for the currently authenticated User.
func UserUpdate ¶
func UserUpdate(w http.ResponseWriter, r *http.Request, u *User) error
update a specific user
Types ¶
type AdminHandler ¶
type AdminHandler func(w http.ResponseWriter, r *http.Request, user *User) error
AdminHandler wraps the default http.HandlerFunc to include the currently authenticated User in the method signature, in addition to handling an error as the return value. It also verifies the user has Administrative privileges.
func (AdminHandler) ServeHTTP ¶
func (h AdminHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type BitbucketHandler ¶ added in v0.2.1
type BitbucketHandler struct {
// contains filtered or unexported fields
}
func NewBitbucketHandler ¶ added in v0.2.1
func NewBitbucketHandler(queue *queue.Queue) *BitbucketHandler
func (*BitbucketHandler) Hook ¶ added in v0.2.1
func (h *BitbucketHandler) Hook(w http.ResponseWriter, r *http.Request) error
Processes a generic POST-RECEIVE Bitbucket hook and attempts to trigger a build.
type BuildResult ¶ added in v0.2.1
type BuildResult struct {
Status string
}
type CommitRebuildHandler ¶ added in v0.2.1
type CommitRebuildHandler struct {
// contains filtered or unexported fields
}
func NewCommitRebuildHandler ¶ added in v0.2.1
func NewCommitRebuildHandler(queue *queue.Queue) *CommitRebuildHandler
func (*CommitRebuildHandler) CommitRebuild ¶ added in v0.2.1
func (h *CommitRebuildHandler) CommitRebuild(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error
CommitRebuild re-queues a previously built commit. It finds the existing commit and build and injects them back into the queue. If the commit doesn't exist or has no builds, or if a build label has been passed but can't be located, it prints an error. Otherwise, it adds the build/commit to the queue and redirects back to the commit page.
type ErrorHandler ¶
type ErrorHandler func(w http.ResponseWriter, r *http.Request) error
ErrorHandler wraps the default http.HandleFunc to handle an error as the return value.
func (ErrorHandler) ServeHTTP ¶
func (h ErrorHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GithubHandler ¶ added in v0.2.1
type GithubHandler struct {
// contains filtered or unexported fields
}
func NewGithubHandler ¶ added in v0.2.1
func NewGithubHandler(queue *queue.Queue) *GithubHandler
func (*GithubHandler) Hook ¶ added in v0.2.1
func (h *GithubHandler) Hook(w http.ResponseWriter, r *http.Request) error
Processes a generic POST-RECEIVE GitHub hook and attempts to trigger a build.
func (*GithubHandler) PullRequestHook ¶ added in v0.2.1
func (h *GithubHandler) PullRequestHook(w http.ResponseWriter, r *http.Request)
type GitlabHandler ¶ added in v0.2.1
type GitlabHandler struct {
// contains filtered or unexported fields
}
func NewGitlabHandler ¶ added in v0.2.1
func NewGitlabHandler(queue *queue.Queue) *GitlabHandler
func (*GitlabHandler) Add ¶ added in v0.2.1
func (g *GitlabHandler) Add(w http.ResponseWriter, r *http.Request, u *User) error
func (*GitlabHandler) Create ¶ added in v0.2.1
func (g *GitlabHandler) Create(w http.ResponseWriter, r *http.Request, u *User) error
func (*GitlabHandler) Hook ¶ added in v0.2.1
func (g *GitlabHandler) Hook(w http.ResponseWriter, r *http.Request) error
func (*GitlabHandler) Link ¶ added in v0.2.1
func (g *GitlabHandler) Link(w http.ResponseWriter, r *http.Request, u *User) error
func (*GitlabHandler) PullRequestHook ¶ added in v0.2.1
func (g *GitlabHandler) PullRequestHook(p *gogitlab.HookPayload, repo *Repo, user *User) error
func (*GitlabHandler) ReLink ¶ added in v0.2.1
func (g *GitlabHandler) ReLink(w http.ResponseWriter, r *http.Request, u *User) error
type PublicHandler ¶ added in v0.2.1
type PublicHandler func(w http.ResponseWriter, r *http.Request, repo *Repo) error
PublicHandler wraps the default http.HandlerFunc to include requested Repository in the method signature, in addition to handling an error as the return value.
func (PublicHandler) ServeHTTP ¶ added in v0.2.1
func (h PublicHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RepoAdminHandler ¶
type RepoAdminHandler func(w http.ResponseWriter, r *http.Request, user *User, repo *Repo) error
RepoHandler wraps the default http.HandlerFunc to include the currently authenticated User and requested Repository in the method signature, in addition to handling an error as the return value.
func (RepoAdminHandler) ServeHTTP ¶
func (h RepoAdminHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RepoHandler ¶
type RepoHandler func(w http.ResponseWriter, r *http.Request, user *User, repo *Repo) error
func (RepoHandler) ServeHTTP ¶
func (h RepoHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type UserHandler ¶
type UserHandler func(w http.ResponseWriter, r *http.Request, user *User) error
UserHandler wraps the default http.HandlerFunc to include the currently authenticated User in the method signature, in addition to handling an error as the return value.
func (UserHandler) ServeHTTP ¶
func (h UserHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)