session

package
v0.0.0-...-afb99dd Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientAppSession = "client-app"
	UserSession      = "user-session"
)
View Source
const (
	KeyAccessType = "type"
	KeyAccessInfo = "info"
	KeyAccessKey  = "key"

	KeyUsername = ""
)

Variables

This section is empty.

Functions

func WithHTTPSessionMiddleware

func WithHTTPSessionMiddleware(store *sessions.CookieStore) mux.MiddlewareFunc

Types

type Cookie struct {
	http.Cookie
}

type WebSession

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

func GetWebSession

func GetWebSession(name string, r *http.Request) (*WebSession, error)

func (*WebSession) Bool

func (s *WebSession) Bool(key string) bool

func (*WebSession) Delete

func (s *WebSession) Delete(key string)

func (*WebSession) Encoded

func (s *WebSession) Encoded() ([]byte, error)

func (*WebSession) Get

func (s *WebSession) Get(key string) interface{}

func (*WebSession) Int64

func (s *WebSession) Int64(key string) int64

func (*WebSession) Put

func (s *WebSession) Put(key string, value interface{})

func (*WebSession) Save

func (s *WebSession) Save(w http.ResponseWriter) error

func (*WebSession) String

func (s *WebSession) String(key string) string

Jump to

Keyboard shortcuts

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