Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KillSession ¶
KillSession logs out the session with the provided cookie
func RandomString ¶
RandomString returns a pseudo-random string of 32 bits
Types ¶
type Controller ¶
type Controller interface { client.Controller GetCreatedAt() time.Time GetTouchAt() time.Time GetDeadline() time.Time MatchCookie(string) bool GetCookie() string SessionStatus() pb.Status }
A Controller represents the session of some client
func FindSessionByClient ¶
func FindSessionByClient(id int64) (ctrl Controller, err error)
FindSessionByClient returns the session with the provided cookie, if exists
func FindSessionByCookie ¶
func FindSessionByCookie(cookie string) (ctrl Controller, err error)
FindSessionByCookie returns the session with the provided cookie, if exists
func NewSession ¶
func NewSession(client client.Controller, timeout time.Duration) (ctrl Controller, err error)
NewSession returns a brand new session for the provided client
Click to show internal directories.
Click to hide internal directories.