Documentation ¶
Overview ¶
Package appctx implements the application's context.
Index ¶
- type Context
- func (ctx *Context) ArtifactsService() *artifacts.Service
- func (ctx *Context) AuthBackend() auth.Backend
- func (ctx *Context) Config() *config.Config
- func (ctx *Context) JobsService() *jobs.Service
- func (ctx *Context) Logger() log.Logger
- func (ctx *Context) PGPService() *pgp.Service
- func (ctx *Context) RequestLogger() *httplog.RequestLogger
- func (ctx *Context) Sessions() *sessions.Manager
- func (ctx *Context) StaticFS() http.FileSystem
- func (ctx *Context) TemplatesRenderer() *htmltemplate.Renderer
- func (ctx *Context) TokensService() *tokens.Service
- func (ctx *Context) UploadsService() *uploads.Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context is the application's context. It holds everityhing that is needed to serve a request.
func New ¶
func New( config *config.Config, renderer *htmltemplate.Renderer, staticFS http.FileSystem, authBackend auth.Backend, sessionsManager *sessions.Manager, services *services.Services, logger log.Logger) *Context
New create an application context
func (*Context) ArtifactsService ¶ added in v0.10.0
ArtifactsService returns the Artifacts service
func (*Context) AuthBackend ¶
AuthBackend returns the authentification service
func (*Context) JobsService ¶
JobsService returns the jobs service
func (*Context) PGPService ¶
PGPService returns the PGP service
func (*Context) RequestLogger ¶ added in v0.10.0
func (ctx *Context) RequestLogger() *httplog.RequestLogger
RequestLogger returns a request logger
func (*Context) StaticFS ¶
func (ctx *Context) StaticFS() http.FileSystem
StaticFS contains static files to be served over http
func (*Context) TemplatesRenderer ¶
func (ctx *Context) TemplatesRenderer() *htmltemplate.Renderer
TemplatesRenderer returns the template renderer
func (*Context) TokensService ¶ added in v0.8.0
TokensService returns the Tokens service
func (*Context) UploadsService ¶
UploadsService returns the uploads service
Click to show internal directories.
Click to hide internal directories.