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 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 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 RepoAdd(w http.ResponseWriter, r *http.Request, u *User) error
- func RepoBadges(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) 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 ErrorHandler
- type HookHandler
- 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 (png 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 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 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 RepoBadges ¶
func RepoBadges(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) 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 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 HookHandler ¶
type HookHandler struct {
// contains filtered or unexported fields
}
func NewHookHandler ¶
func NewHookHandler(queue *queue.Queue) *HookHandler
func (*HookHandler) Hook ¶
func (h *HookHandler) Hook(w http.ResponseWriter, r *http.Request) error
Processes a generic POST-RECEIVE hook and attempts to trigger a build.
func (*HookHandler) PullRequestHook ¶
func (h *HookHandler) PullRequestHook(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
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 (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)