request

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContextKeyRequestData = "request-data"

ContextKeyRequestData ...

Functions

This section is empty.

Types

type RData

type RData interface {
	UserID() string
	SetUserID(userID string)
	Role() types.RoleType
	SetRole(role types.RoleType)
	IsAdmin() bool
}

RData the data hold in request context

func FromCookie

func FromCookie(cookie *http.Cookie) (RData, bool)

FromCookie get RequestData from cookie value

func NewRequestData

func NewRequestData() RData

NewRequestData create RequestData

Jump to

Keyboard shortcuts

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