session

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SessID string         = "default-sessions"
	Store  sessions.Store = nil
)

Functions

func DefaultHandler

func DefaultHandler() gin.HandlerFunc

DefaultHandler .

func Disconnect

func Disconnect(c *gin.Context)

Disconnect .

func GetLoginStatus

func GetLoginStatus(c *gin.Context) bool

GetLoginStatus from gin.Context

func IsAdmin

func IsAdmin(c *gin.Context) bool

IsAdmin .

func NewHandler

func NewHandler(name string, store sessions.Store) gin.HandlerFunc

NewHandler .

func NewStore

func NewStore(secret string) sessions.Store

NewStore .

func SetLoginStatus

func SetLoginStatus(c *gin.Context, status bool, isadmin bool)

SetLoginStatus on gin.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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