accessor

package
v0.30.13 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: AGPL-3.0, AGPL-3.0-only Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NeedLogin added in v0.30.12

func NeedLogin(next echo.HandlerFunc) echo.HandlerFunc

func Put

func Put(a *Accessor)

Types

type Accessor

type Accessor struct {
	RequestID string
	IP        string
	auth.Auth
	Login bool
}

func FromCtx added in v0.30.12

func FromCtx(c echo.Context) *Accessor

func Get

func Get() *Accessor

func (*Accessor) AllowNSFW

func (a *Accessor) AllowNSFW() bool

func (*Accessor) FillBasicInfo

func (a *Accessor) FillBasicInfo(c echo.Context)

func (Accessor) Log

func (a Accessor) Log() zap.Field

func (Accessor) MarshalLogObject

func (a Accessor) MarshalLogObject(encoder zapcore.ObjectEncoder) error

func (*Accessor) SetAuth

func (a *Accessor) SetAuth(auth auth.Auth)

Jump to

Keyboard shortcuts

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