Documentation ¶
Index ¶
- Variables
- type Config
- type Service
- func (s *Service) Del(r *http.Request, fieldname string) error
- func (s *Service) Execute(us *usersystem.UserSystem) error
- func (s *Service) Get(r *http.Request, fieldname string, v interface{}) error
- func (s *Service) IsNotFoundError(err error) bool
- func (s *Service) MustGetRequestSession(r *http.Request, st usersystem.SessionType) *usersystem.Session
- func (s *Service) MustGetSession(st usersystem.SessionType, id string) *usersystem.Session
- func (s *Service) MustLoginRequestSession(r *http.Request, payloads *authority.Payloads) *usersystem.Session
- func (s *Service) MustLogoutRequestSession(r *http.Request) bool
- func (s *Service) MustRevokeSession(code string) bool
- func (s *Service) SessionMiddleware() func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (s *Service) Set(r *http.Request, fieldname string, v interface{}) error
- func (s *Service) Start() error
- func (s *Service) Stop() error
Constants ¶
This section is empty.
Variables ¶
View Source
var DirectiveFactory = func(loader func(v interface{}) error) (usersystem.Directive, error) { c := &Config{} err := loader(c) if err != nil { return nil, err } return c, nil }
View Source
var PayloadsField = []byte("payloads")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Prefix string *httpsession.Config }
func (*Config) CreateService ¶
func (*Config) Execute ¶
func (c *Config) Execute(s *usersystem.UserSystem) error
type Service ¶
type Service struct { Prefix []byte Store *httpsession.Store }
func NewService ¶
func NewService() *Service
func (*Service) Execute ¶
func (s *Service) Execute(us *usersystem.UserSystem) error
func (*Service) IsNotFoundError ¶
IsNotFoundError check if given error is session not found error.
func (*Service) MustGetRequestSession ¶
func (s *Service) MustGetRequestSession(r *http.Request, st usersystem.SessionType) *usersystem.Session
func (*Service) MustGetSession ¶
func (s *Service) MustGetSession(st usersystem.SessionType, id string) *usersystem.Session
func (*Service) MustLoginRequestSession ¶
func (*Service) MustLogoutRequestSession ¶
func (*Service) MustRevokeSession ¶
func (*Service) SessionMiddleware ¶
func (s *Service) SessionMiddleware() func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
Click to show internal directories.
Click to hide internal directories.