Documentation
¶
Index ¶
- Constants
- func AttachHandler(app *gimlet.APIApp, queue amboy.Queue, URL string, superUsers []string, ...)
- func GetProjectContext(ctx context.Context) *model.Context
- func MustHaveProjectContext(ctx context.Context) *model.Context
- func MustHaveUser(ctx context.Context) *user.DBUser
- func NewProjectContextMiddleware(sc data.Connector) gimlet.Middleware
Constants ¶
View Source
const ( // Key value used to map user and project data to request context. // These are private custom types to avoid key collisions. RequestContext requestContextKey = 0 )
Variables ¶
This section is empty.
Functions ¶
func AttachHandler ¶
func AttachHandler(app *gimlet.APIApp, queue amboy.Queue, URL string, superUsers []string, githubSecret []byte)
AttachHandler attaches the api's request handlers to the given mux router. It builds a Connector then attaches each of the main functions for the api to the router.
func GetProjectContext ¶
GetProjectContext returns the project context associated with a given request.
func MustHaveProjectContext ¶
MustHaveProjectContext returns the project context set on the http request context. It panics if none is set.
func MustHaveUser ¶
MustHaveUser returns the user associated with a given request or panics if none is present.
func NewProjectContextMiddleware ¶
func NewProjectContextMiddleware(sc data.Connector) gimlet.Middleware
Types ¶
This section is empty.
Source Files
¶
- admin_banner.go
- admin_clear.go
- admin_events.go
- admin_flags.go
- admin_legacy.go
- admin_restart.go
- admin_settings.go
- alias.go
- build.go
- build_task.go
- cli_version.go
- cost.go
- distro.go
- github.go
- host.go
- host_create.go
- host_spawn.go
- keys.go
- metrics.go
- middleware.go
- notifications_route.go
- patch.go
- placeholder.go
- project.go
- service.go
- status.go
- subscription.go
- task.go
- task_abort.go
- task_generate.go
- task_project.go
- task_restart.go
- test.go
- user.go
- version.go
Click to show internal directories.
Click to hide internal directories.