session

package
v0.0.0-...-d17281b Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Put

func Put(ctx context.Context, v *Session) context.Context

Types

type Manager

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

func New

func New(cfg *config.Config) (*Manager, error)

func (*Manager) Create

func (o *Manager) Create(ctx context.Context, data interface{}) (string, error)

func (*Manager) CreateBytes

func (o *Manager) CreateBytes(ctx context.Context, plain []byte) (string, error)

func (*Manager) Open

func (o *Manager) Open(ctx context.Context, jwt string, dst interface{}) error

func (*Manager) OpenBytes

func (o *Manager) OpenBytes(ctx context.Context, jwt string) ([]byte, error)

type Session

type Session struct {
	LoggedIn   bool
	LoggedInAt time.Time
	UserInfo   map[string]interface{}
}

func Get

func Get(ctx context.Context) (*Session, bool)

Jump to

Keyboard shortcuts

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