Documentation ¶
Index ¶
- Constants
- func NewGetSessionError() *rest.Error
- func NewMiddleware(s rest.Server, store Store) func(next http.Handler) http.Handler
- func NewRouter(s rest.Server, store Store, email MailService, clock clock.Clock) *chi.Mux
- type MailService
- type PasswordResetToken
- type School
- type Session
- type Store
- type User
Constants ¶
View Source
const (
SessionCtxKey = "session"
)
Variables ¶
This section is empty.
Functions ¶
func NewGetSessionError ¶
func NewMiddleware ¶
Types ¶
type MailService ¶
type PasswordResetToken ¶
type Session ¶
type Store ¶
type Store interface { ResolveInviteCode(inviteCodeId string) (*School, error) GetUserByEmail(email string) (*User, error) NewSession(userId string) (*Session, error) NewUser(email string, password string, name string, inviteCode string) (*User, error) GetSession(token string) (*Session, error) DeleteSession(token string) error NewPasswordResetToken(userId string) (*PasswordResetToken, error) GetPasswordResetToken(token string) (*PasswordResetToken, error) DoPasswordReset(userId string, newPassword string, token string) error }
Click to show internal directories.
Click to hide internal directories.