Documentation
¶
Index ¶
- func New(cfg *config.Config, auth auth.Auth) error
- type Frontend
- type Pipe
- type Session
- type SessionStore
- func (store *SessionStore) Delete(key string)
- func (store *SessionStore) Expired(last int64) bool
- func (store *SessionStore) Get(key string) string
- func (store *SessionStore) GetInt(key string) int64
- func (store *SessionStore) Init()
- func (store *SessionStore) Save()
- func (store *SessionStore) Set(key string, value string)
- func (store *SessionStore) SetInt(key string, value int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Frontend ¶
type Frontend struct { GroupValid auth.PipeGroupValid Addr string Auth auth.Auth Session *Session Wait *sync.WaitGroup BackendHostName string BackendProxy *fasthttp.HostClient BackendTimeout time.Duration }
func (*Frontend) SoftRedirect ¶
func (frontend *Frontend) SoftRedirect(ctx *fasthttp.RequestCtx) auth.SoftRedirect
SoftRedirect perform a redirect handle by javascript code
type Session ¶
type Session struct { Cookie *securecookie.SecureCookie Config *config.SessionConfig }
func NewSession ¶
func NewSession(cfg config.SessionConfig) (*Session, error)
func (*Session) Store ¶
func (session *Session) Store(ctx *fasthttp.RequestCtx) *SessionStore
type SessionStore ¶
type SessionStore struct { Cookie *securecookie.SecureCookie Ctx *fasthttp.RequestCtx Config *config.SessionConfig Stored bool // contains filtered or unexported fields }
func (*SessionStore) Delete ¶
func (store *SessionStore) Delete(key string)
func (*SessionStore) Expired ¶
func (store *SessionStore) Expired(last int64) bool
func (*SessionStore) Get ¶
func (store *SessionStore) Get(key string) string
Get string value from session store
func (*SessionStore) GetInt ¶
func (store *SessionStore) GetInt(key string) int64
GetInt int value from session store
func (*SessionStore) Save ¶
func (store *SessionStore) Save()
func (*SessionStore) Set ¶
func (store *SessionStore) Set(key string, value string)
func (*SessionStore) SetInt ¶
func (store *SessionStore) SetInt(key string, value int64)
Click to show internal directories.
Click to hide internal directories.