user

package
v0.0.0-...-b829c5b Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(email, password string) map[string]interface{}

Types

type Account

type Account struct {
	gorm.Model
	Email    string `json:"email"`
	Password string `json:"password"`
	Token    string `json:"token"`
}

func GetUser

func GetUser(u uint) *Account

func (*Account) Create

func (account *Account) Create() map[string]interface{}

func (*Account) Validate

func (account *Account) Validate() (map[string]interface{}, bool)

type Token

type Token struct {
	UserId uint
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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