Documentation
¶
Index ¶
- func CreateSessionHandlerFunc(cache Cache) http.HandlerFunc
- func DeleteAllSessionsHandlerFunc(cache Cache) http.HandlerFunc
- func GetByEmailSessionHandlerFunc(cache Cache, getVarsFunc GetVarsFunc) http.HandlerFunc
- func GetByIDSessionHandlerFunc(cache Cache, getVarsFunc GetVarsFunc) http.HandlerFunc
- type API
- type AuthHandler
- type Cache
- type GetVarsFunc
- type SessionUpdater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSessionHandlerFunc ¶ added in v0.2.0
func CreateSessionHandlerFunc(cache Cache) http.HandlerFunc
CreateSessionHandlerFunc returns a function that generates a session. Method = "POST"
func DeleteAllSessionsHandlerFunc ¶ added in v0.2.0
func DeleteAllSessionsHandlerFunc(cache Cache) http.HandlerFunc
func GetByEmailSessionHandlerFunc ¶ added in v1.0.0
func GetByEmailSessionHandlerFunc(cache Cache, getVarsFunc GetVarsFunc) http.HandlerFunc
GetByEmailSessionHandlerFunc returns a function that retrieves a session by ID from the cache
func GetByIDSessionHandlerFunc ¶ added in v0.2.0
func GetByIDSessionHandlerFunc(cache Cache, getVarsFunc GetVarsFunc) http.HandlerFunc
GetByIDSessionHandlerFunc returns a function that retrieves a session by ID from the cache
Types ¶
type AuthHandler ¶ added in v0.2.0
type AuthHandler interface {
Require(required auth.Permissions, handler http.HandlerFunc) http.HandlerFunc
}
AuthHandler interface for adding auth to endpoints
type Cache ¶ added in v0.2.0
type Cache interface {
SetSession(s *session.Session) error
GetByID(ID string) (*session.Session, error)
GetByEmail(email string) (*session.Session, error)
DeleteAll() error
}
Cache interface for storing and retrieving sessions
type GetVarsFunc ¶ added in v0.2.0
GetVarsFunc is a helper function that returns a map of request variables and parameters
Click to show internal directories.
Click to hide internal directories.