Help us shape the future of Go! Take the 2026 Go Developer Survey

sessions

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Service *Service
}

func (*Controller) Clear

func (x *Controller) Clear(ctx context.Context, c *app.RequestContext)

func (*Controller) Lists

func (x *Controller) Lists(ctx context.Context, c *app.RequestContext)

func (*Controller) Remove

func (x *Controller) Remove(ctx context.Context, c *app.RequestContext)

type Option

type Option func(x *Service)

func SetDynamicValues

func SetDynamicValues(v *values.DynamicValues) Option

func SetRedis

func SetRedis(v *redis.Client) Option

type RemoveDto added in v0.4.2

type RemoveDto struct {
	Uid string `path:"uid,required" vd:"mongodb"`
}

type ScanFn added in v0.4.2

type ScanFn func(key string)

type Service

type Service struct {
	RDb    *redis.Client
	Values *values.DynamicValues
}

func New

func New(options ...Option) *Service

func (*Service) Clear

func (x *Service) Clear(ctx context.Context) int64

func (*Service) Key

func (x *Service) Key(name string) string

func (*Service) Lists

func (x *Service) Lists(ctx context.Context) (data []string)

func (*Service) Remove

func (x *Service) Remove(ctx context.Context, name string) int64

func (*Service) Renew

func (x *Service) Renew(ctx context.Context, userId string) bool

func (*Service) Scan

func (x *Service) Scan(ctx context.Context, fn ScanFn)

func (*Service) Set

func (x *Service) Set(ctx context.Context, name string, jti string) string

func (*Service) Verify

func (x *Service) Verify(ctx context.Context, name string, jti string) bool

Jump to

Keyboard shortcuts

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