requests

package
v0.0.0-...-99409e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2018 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustPathVarsFromContext

func MustPathVarsFromContext(ctx context.Context) map[string]string

func MustUserFromContext

func MustUserFromContext(ctx context.Context) *model.User

func UserFromContext

func UserFromContext(ctx context.Context) *model.User

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) Delete

func (s *Session) Delete(req *http.Request, rw http.ResponseWriter)

func (*Session) Save

func (s *Session) Save(req *http.Request, rw http.ResponseWriter)

func (*Session) SetSpotifyUserID

func (s *Session) SetSpotifyUserID(userID string)

func (*Session) SpotifyUserID

func (s *Session) SpotifyUserID() string

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)

func (*Sessions) GetSession

func (s *Sessions) GetSession(req *http.Request) (*Session, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL