Documentation ¶
Index ¶
- Constants
- func ByUUIDMiddleware(repo DataRepo) func(h http.Handler) http.Handler
- func GetPlayerHandler(repo DataRepo) http.HandlerFunc
- func GetVerificationsHandler(repo DataRepo) http.HandlerFunc
- func PostPlayerHandler(repo DataRepo) http.HandlerFunc
- func PostVerificationEmailHandler(cfg VerificationEmailConfig, mail mailer.Service, repo DataRepo) http.HandlerFunc
- func PostVerificationHandler(repo DataRepo) http.HandlerFunc
- func PostVerificationVerifyHandler(repo DataRepo) http.HandlerFunc
- type DataRepo
- type Player
- type Verification
- type VerificationEmail
- type VerificationEmailCode
- type VerificationEmailConfig
Constants ¶
View Source
const ( CtxUUIDKey ctxKey = iota CtxUsernameKey )
Variables ¶
This section is empty.
Functions ¶
func GetPlayerHandler ¶
func GetPlayerHandler(repo DataRepo) http.HandlerFunc
func GetVerificationsHandler ¶
func GetVerificationsHandler(repo DataRepo) http.HandlerFunc
func PostPlayerHandler ¶
func PostPlayerHandler(repo DataRepo) http.HandlerFunc
func PostVerificationEmailHandler ¶
func PostVerificationEmailHandler(cfg VerificationEmailConfig, mail mailer.Service, repo DataRepo) http.HandlerFunc
func PostVerificationHandler ¶
func PostVerificationHandler(repo DataRepo) http.HandlerFunc
func PostVerificationVerifyHandler ¶
func PostVerificationVerifyHandler(repo DataRepo) http.HandlerFunc
Types ¶
type DataRepo ¶
type DataRepo interface { PlayerWithUUIDExists(uuid string) (bool, error) PlayerByUUID(uuid string) (Player, error) CreatePlayer(p *Player) error Verifications(pUUID string) ([]Verification, error) CreateVerification(v *Verification) error LatestVerification(pUUID string) (Verification, bool, error) CreateEmailVerification(ve VerificationEmail) error VerifyVerification(vID uint64, code string) (bool, error) }
type Player ¶
type Verification ¶
type VerificationEmail ¶
type VerificationEmailCode ¶
type VerificationEmailCode struct {
Code string `json:"code"`
}
func (VerificationEmailCode) Validate ¶
func (code VerificationEmailCode) Validate() error
Click to show internal directories.
Click to hide internal directories.