router

package
v0.0.0-...-e39b2f3 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmVerificationCodeHandler

func ConfirmVerificationCodeHandler(w http.ResponseWriter, r *http.Request)

ConfirmVerificationCodeHandler /verificationcode/confirm

func GenerateVerificationCodeHandler

func GenerateVerificationCodeHandler(w http.ResponseWriter, r *http.Request)

GenerateVerificationCodeHandler /verificationcode/generate

func IndexHandler

func IndexHandler(w http.ResponseWriter, r *http.Request)

IndexHandler /

func NewRouter

func NewRouter() *mux.Router

NewRouter oauth server router

func SignUpHandler

func SignUpHandler(w http.ResponseWriter, r *http.Request)

SignUpHandler /signup

func TokenHandler

func TokenHandler(w http.ResponseWriter, r *http.Request)

TokenHandler /token

Types

type ConfirmVerificationCodeRequest

type ConfirmVerificationCodeRequest struct {
	MailAddress      string `validate:"required,email"`
	VerificationCode int    `validate:"gte=0,lt=999999"`
}

ConfirmVerificationCodeRequest confirm verification code request

type GenerateVerificationCodeRequest

type GenerateVerificationCodeRequest struct {
	MailAddress string `validate:"required,email"`
}

GenerateVerificationCodeRequest generate verificationcode request

type SignUpRequest

type SignUpRequest struct {
	MailAddress      string `validate:"required,email"`
	VerificationCode int    `validate:"min=1,max=999999"`
	Username         string `validate:"required"`
	Password         string `validate:"required,min=5,max=50"`
}

SignUpRequest sign up request

type TokenRequest

type TokenRequest struct {
	Mailaddress string `validate:"required,email"`
	Password    string `validate:"required"`
}

TokenRequest token request struct

type TokenResponse

type TokenResponse struct {
	UserName     string `json:"user_name"`
	AccessToken  string `json:"access_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int    `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
}

TokenResponse token response struct

Jump to

Keyboard shortcuts

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