session

package
v0.0.0-...-925651e Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSession

type FileSession struct {
	SessionKey interface{}
	FileMode   os.FileMode
}

func File

func File(sessionKey string) *FileSession

func (*FileSession) Flush

func (s *FileSession) Flush(name string) (interface{}, *errors.AppError)

func (*FileSession) Get

func (s *FileSession) Get(name string) (interface{}, *errors.AppError)

func (*FileSession) GetFlash

func (s *FileSession) GetFlash(name string) interface{}

func (*FileSession) GetFlashMap

func (s *FileSession) GetFlashMap(name string) *map[string]interface{}

GetFlashMap this pulls a session flash from PutFlashMap, in which it will reverse the json into a map

func (*FileSession) Put

func (s *FileSession) Put(name string, value interface{}) (bool, *errors.AppError)

func (*FileSession) PutFlash

func (s *FileSession) PutFlash(name string, value interface{})

func (*FileSession) PutFlashMap

func (s *FileSession) PutFlashMap(name string, value interface{})

PutFlashMap sets a session flash based on json format make sure the values you're providing is set as map[string]interface{} therefore, we can stringify it into json format

type SessionContract

type SessionContract interface {
	Put(name string, value interface{}) (bool, *errors.AppError)
	Get(name string) (interface{}, *errors.AppError)
	Flush(name string) (interface{}, *errors.AppError)
	PutFlash(name string, value interface{})
	GetFlash(name string) interface{}
	PutFlashMap(name string, value interface{})
	GetFlashMap(name string) *map[string]interface{}
}

func Driver

func Driver(key string, sessionKey string) SessionContract

Jump to

Keyboard shortcuts

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