middleware

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	// contains filtered or unexported fields
}

func NewAuth

func NewAuth(service contracts.AuthService) *Auth

func (*Auth) Handle

func (a *Auth) Handle(interface{}) web.HandlerFunc

type Config

type Config struct {
	Groups map[string]([]string)
}

type Cors

type Cors struct {
	// contains filtered or unexported fields
}

func NewCors

func NewCors(cfg http.CorsConfig) *Cors

func (*Cors) Handle

func (h *Cors) Handle(interface{}) web.HandlerFunc

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(app contracts.Application, cfg Config) *Service

func (*Service) Global

func (s *Service) Global() []web.HandlerFunc

func (*Service) Register

func (s *Service) Register(name string, constructor contracts.MiddlewareConstructor) error

func (*Service) Use

func (s *Service) Use(name string, params interface{}) web.HandlerFunc

type StartSession

type StartSession struct {
	// contains filtered or unexported fields
}

func NewStartSession

func NewStartSession(service contracts.SessionService) *StartSession

func (*StartSession) Handle

func (m *StartSession) Handle(interface{}) web.HandlerFunc

type UserHasPermission

type UserHasPermission struct {
	// contains filtered or unexported fields
}

func NewUserHasPermission

func NewUserHasPermission(service contracts.AuthService) *UserHasPermission

func (*UserHasPermission) Handle

func (a *UserHasPermission) Handle(param interface{}) web.HandlerFunc

type UserHasPermissionParam

type UserHasPermissionParam struct {
	NeededPermission string
}

type UserHasRole

type UserHasRole struct {
	// contains filtered or unexported fields
}

func NewUserHasRole

func NewUserHasRole(service contracts.AuthService) *UserHasRole

func (*UserHasRole) Handle

func (a *UserHasRole) Handle(param interface{}) web.HandlerFunc

type UserHasRoleParam

type UserHasRoleParam struct {
	Roles []string
}

type VerifyCSRFToken

type VerifyCSRFToken struct {
	// contains filtered or unexported fields
}

func NewVerifyCSRFToken

func NewVerifyCSRFToken(cfg http.CSRFConfig, sessionService contracts.SessionService) (*VerifyCSRFToken, error)

func (*VerifyCSRFToken) Handle

func (m *VerifyCSRFToken) Handle(interface{}) web.HandlerFunc

Jump to

Keyboard shortcuts

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