appctx

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package appctx implements the application's context.

Index

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

func (ctx *Context) ArtifactsService() *artifacts.Service

ArtifactsService returns the Artifacts service

func (*Context) AuthBackend

func (ctx *Context) AuthBackend() auth.Backend

AuthBackend returns the authentification service

func (*Context) Config

func (ctx *Context) Config() *config.Config

Config returns the context's config

func (*Context) JobsService

func (ctx *Context) JobsService() *jobs.Service

JobsService returns the jobs service

func (*Context) Logger

func (ctx *Context) Logger() log.Logger

Logger returns the logger

func (*Context) PGPService

func (ctx *Context) PGPService() *pgp.Service

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) Sessions

func (ctx *Context) Sessions() *sessions.Manager

Sessions returns the sessions manager

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

func (ctx *Context) TokensService() *tokens.Service

TokensService returns the Tokens service

func (*Context) UploadsService

func (ctx *Context) UploadsService() *uploads.Service

UploadsService returns the uploads service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL