contexthandler

package
v0.0.0-...-900be4e Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package contexthandler contains the ContextHandler service.

Index

Constants

View Source
const (
	InvalidUsernamePassword = "invalid username or password"
	InvalidAPIKey           = "invalid API key"
)
View Source
const ServiceName = "ContextHandler"

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextHandler

type ContextHandler struct {
	Cfg              *setting.Cfg             `inject:""`
	AuthTokenService models.UserTokenService  `inject:""`
	RemoteCache      *remotecache.RemoteCache `inject:""`
	RenderService    rendering.Service        `inject:""`
	SQLStore         *sqlstore.SQLStore       `inject:""`

	// GetTime returns the current time.
	// Stubbable by tests.
	GetTime func() time.Time
}

ContextHandler is a middleware.

func (*ContextHandler) Init

func (h *ContextHandler) Init() error

Init initializes the service.

func (*ContextHandler) Middleware

func (h *ContextHandler) Middleware(c *macaron.Context)

Middleware provides a middleware to initialize the Macaron context.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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