session

package
v0.0.0-...-d39ba65 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COOKIE_NAME = "sessionId"
)

Variables

This section is empty.

Functions

func Middleware

func Middleware(ctx martini.Context, r *http.Request, w http.ResponseWriter)

Types

type Session

type Session struct {
	Username     string
	IsAuthorized bool
	// contains filtered or unexported fields
}

type SessionStore

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

func NewSessionStore

func NewSessionStore() *SessionStore

func (*SessionStore) Get

func (store *SessionStore) Get(sessionId string) *Session

func (*SessionStore) Set

func (store *SessionStore) Set(session *Session)

Jump to

Keyboard shortcuts

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