model

package
v0.0.0-...-c7ec203 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginResponse

type LoginResponse struct {
	*Response
	AccessToken string `json:"access_token,omitempty"`
}

type Permission

type Permission struct {
	ID   int64
	Name string
}

type Response

type Response struct {
	Code  int    `json:"code"`
	Error string `json:"error,omitempty"`
}

type Role

type Role struct {
	ID        string
	Name      string
	CreatedAt string `db:"created_at"`
}

type User

type User struct {
	ID        string
	Email     string
	Password  string
	IPAddress string `db:"ip_address"`
	CreatedAt string `db:"created_at"`
	Roles     []*Role
}

func (*User) ComparePassword

func (user *User) ComparePassword(password string) bool

func (*User) HashedPassword

func (user *User) HashedPassword() error

type UserCredentials

type UserCredentials struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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