Documentation ¶
Index ¶
- func MustPathVarsFromContext(ctx context.Context) map[string]string
- func MustUserFromContext(ctx context.Context) *model.User
- func UserFromContext(ctx context.Context) *model.User
- func WithContext(handler http.HandlerFunc) func(rw http.ResponseWriter, req *http.Request)
- type ContextPathVars
- type ContextUser
- type Session
- type SessionConfig
- type Sessions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithContext ¶
func WithContext(handler http.HandlerFunc) func(rw http.ResponseWriter, req *http.Request)
Types ¶
type ContextPathVars ¶
type ContextPathVars struct{}
type ContextUser ¶
type ContextUser struct{}
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) SetSpotifyUserID ¶
func (*Session) SpotifyUserID ¶
type SessionConfig ¶
type SessionConfig struct { Base64AuthenticationKey string `yaml:"authentication_key"` Base64EncryptionKey string `yaml:"encryption_key"` }
func (*SessionConfig) AuthenticationKey ¶
func (s *SessionConfig) AuthenticationKey() ([]byte, error)
func (*SessionConfig) EncryptionKey ¶
func (s *SessionConfig) EncryptionKey() ([]byte, error)
type Sessions ¶
type Sessions struct {
// contains filtered or unexported fields
}
func NewSessions ¶
func NewSessions(config *SessionConfig) (*Sessions, error)
Click to show internal directories.
Click to hide internal directories.