session

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUser

func GetUser(ctx context.Context) (*models.User, bool)

Types

type Flash

type Flash struct {
	Type    FlashType
	Title   string
	Message string
	Fatal   bool
}

type FlashType

type FlashType string
const (
	FlashTypeSuccess FlashType = "success"
	FlashTypeWarning FlashType = "warning"
	FlashTypeError   FlashType = "error"
)

type Service

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

func NewSession

func NewSession(sessionStore sessions.Store) *Service

func (*Service) GetFlashes

func (s *Service) GetFlashes(w http.ResponseWriter, r *http.Request) ([]any, error)

func (*Service) NewFlash

func (s *Service) NewFlash(w http.ResponseWriter, r *http.Request, f Flash)

Jump to

Keyboard shortcuts

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