sessions

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSessionId added in v1.0.1

func GetSessionId() string

Types

type AbstractSession

type AbstractSession interface {
	Set(string, string)
	Get(string) string
	AddFlush(string, string)
	Remove(string)
}

type AbstractSessionStore

type AbstractSessionStore interface {
	Get(string, interface{}) error
	Save(string, interface{}) error
	Delete(string) error
}

type Config

type Config struct {
	CookieName string
	Expires    time.Duration
}
type Cookie struct {
	// contains filtered or unexported fields
}

func (*Cookie) Delete

func (c *Cookie) Delete(name string)

func (*Cookie) Get

func (c *Cookie) Get(name string) string

func (*Cookie) Reset

func (c *Cookie) Reset(ctx *fasthttp.RequestCtx)

func (*Cookie) Set

func (c *Cookie) Set(name string, value string, maxAge int)

type Session

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

func (*Session) AddFlush added in v1.0.1

func (sess *Session) AddFlush(key string, val string)

func (*Session) Get

func (sess *Session) Get(key string) string

func (*Session) Remove

func (sess *Session) Remove(key string)

func (*Session) Set

func (sess *Session) Set(key string, val string)

type Sessions

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

func New

func New(provider AbstractSessionStore, cfg *Config) *Sessions

func (*Sessions) Session

func (m *Sessions) Session(cookie *Cookie) (sess AbstractSession, err error)

Directories

Path Synopsis
providers

Jump to

Keyboard shortcuts

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