session

package module
v0.0.0-...-2b36245 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2018 License: Apache-2.0 Imports: 13 Imported by: 4

README

session GoDoc

Session library for APIBox.

See full document at: https://go-apibox.github.io/docs/#!other/session.md (Chinese)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandSessionId

func RandSessionId() string

Types

type CookieStore

type CookieStore struct {
	sessions.CookieStore

	SessionCache *cache.Cache
	// contains filtered or unexported fields
}

func DefaultCookieStore

func DefaultCookieStore() (*CookieStore, error)

func NewCookieStore

func NewCookieStore(autoUpdate bool, keyPairsFile string) (*CookieStore, error)

func (*CookieStore) GenerateKeyPairs

func (store *CookieStore) GenerateKeyPairs()

func (*CookieStore) Get

func (s *CookieStore) Get(r *http.Request, name string) (*Session, error)

func (*CookieStore) GetKeyPairs

func (store *CookieStore) GetKeyPairs() [][]byte

func (*CookieStore) LoadKeyPairs

func (store *CookieStore) LoadKeyPairs(keyPairs [][]byte)

type Session

type Session struct {
	sessions.Session
	// contains filtered or unexported fields
}

func (*Session) Delete

func (s *Session) Delete(key string)

func (*Session) Destroy

func (s *Session) Destroy(w http.ResponseWriter) error

func (*Session) Get

func (s *Session) Get(key string) (interface{}, error)

func (*Session) GetBool

func (s *Session) GetBool(key string) (bool, error)

func (*Session) GetBoolArray

func (s *Session) GetBoolArray(key string) ([]bool, error)

func (*Session) GetInt

func (s *Session) GetInt(key string) (int, error)

func (*Session) GetInt32

func (s *Session) GetInt32(key string) (int32, error)

func (*Session) GetInt32Array

func (s *Session) GetInt32Array(key string) ([]int32, error)

func (*Session) GetInt64

func (s *Session) GetInt64(key string) (int64, error)

func (*Session) GetInt64Array

func (s *Session) GetInt64Array(key string) ([]int64, error)

func (*Session) GetIntArray

func (s *Session) GetIntArray(key string) ([]int, error)

func (*Session) GetString

func (s *Session) GetString(key string) (string, error)

func (*Session) GetStringArray

func (s *Session) GetStringArray(key string) ([]string, error)

func (*Session) GetUint

func (s *Session) GetUint(key string) (uint, error)

func (*Session) GetUint32

func (s *Session) GetUint32(key string) (uint32, error)

func (*Session) GetUint32Array

func (s *Session) GetUint32Array(key string) ([]uint32, error)

func (*Session) GetUint64

func (s *Session) GetUint64(key string) (uint64, error)

func (*Session) GetUint64Array

func (s *Session) GetUint64Array(key string) ([]uint64, error)

func (*Session) GetUintArray

func (s *Session) GetUintArray(key string) ([]uint, error)

func (*Session) Save

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

func (*Session) Set

func (s *Session) Set(key string, val interface{})

func (*Session) SetMap

func (s *Session) SetMap(m map[string]interface{})

Jump to

Keyboard shortcuts

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