session

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (

	// Account is the key of account data in the session.
	Account = "Account"
)

Variables

This section is empty.

Functions

func Delete added in v1.3.1

func Delete(c echo.Context) error

Delete the current session.

func Get

func Get(c echo.Context) *sessions.Session

Get returns a session for the current request.

func GetAccount

func GetAccount(c echo.Context) *model.Account

GetAccount returns account object of session.

func GetValue

func GetValue(c echo.Context, key string) string

GetValue returns value of session.

func Save

func Save(c echo.Context) error

Save saves the current session.

func SetAccount

func SetAccount(c echo.Context, account *model.Account) error

SetAccount sets account data in session.

func SetValue

func SetValue(c echo.Context, key string, value interface{}) error

SetValue sets a key and a value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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