model

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDB

func GetDB() *gorm.DB

func Login

func Login(uname, password string, w http.ResponseWriter) map[string]interface{}

func Refresh

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

Types

type Auth

type Auth struct {
	gorm.Model
	UName    string `json:"uname"`
	Status   string `json:"status"`
	Password string `json:"password"`
	Role     string `json:"role"`
	Response string `json:"response"`
}

func (*Auth) Create

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

func (*Auth) Validate

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

Validate incoming user details...

Jump to

Keyboard shortcuts

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