session

package
v0.0.0-...-2cea6d0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New() *Session

func (*Session) Get

func (s *Session) Get(key string) (SessionObj, bool)

func (*Session) IsExpired

func (s *Session) IsExpired(sess SessionObj) bool

func (*Session) IsKeyPrivate

func (s *Session) IsKeyPrivate(key string) (SessionObj, bool)

func (*Session) Set

func (s *Session) Set(key, value string, isPrivate bool, exp int64)

type SessionObj

type SessionObj struct {
	IsPrivate bool
	Key       string
	Value     string
	Expired   int64
}

Jump to

Keyboard shortcuts

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