Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrorResponse ¶
type ErrorResponse struct { Code int `json:"code"` Error string `json:"error"` Description string `json:"description"` }
ErrorResponse represents an HTTP error
type MemorySessionStore ¶
type MemorySessionStore struct {
// contains filtered or unexported fields
}
MemorySessionStore represents a SessionStore that uses an in-memory map
func NewMemorySessionStore ¶
func NewMemorySessionStore(duration time.Duration) *MemorySessionStore
NewMemorySessionStore returns a new MemorySessionStore with the given expiration duration.
type SessionStore ¶
type SessionStore interface { //Create returns a new sessionID with the given User. If the backend malfunctions, //sessionID will be an empty string and err will be non-nil. Create(user *api.User) (sessionID string, err error) //Check returns whether or not sessionID is a valid session. //If sessionID is not valid, session will be nil. //If the backend malfunctions, session will be nil and err will be non-nil. Check(sessionID string) (session *Session, err error) }
SessionStore is an interface to an arbitrary session backend.
Click to show internal directories.
Click to hide internal directories.