user

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(e echo.Context) error

func Login

func Login(e echo.Context) error

func Logout

func Logout(e echo.Context) error

func Register

func Register(e echo.Context) error

func Set

func Set(e echo.Context) error

func UsernameCheck

func UsernameCheck(e echo.Context) error

func VailEmail

func VailEmail(email string) bool

func VailPhone

func VailPhone(phone string) bool

Types

type LoginModel

type LoginModel struct {
	Username     string `json:"username"`
	Password     string `json:"password"`
	HashPassword string `json:"hash_password,omitempty"`
}

type Token

type Token struct {
	Token     string    `json:"token"`
	ExpiresAt time.Time `json:"expires_at"`
	Role      int       `json:"role"`
	UserID    string    `json:"-"`
}

Jump to

Keyboard shortcuts

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