controllers

package
v0.0.0-...-c90bac2 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNewUser

func CreateNewUser(user *model.User) error

func CreateUserTable

func CreateUserTable(db *pg.DB) error

func InitiateDB

func InitiateDB(db *pg.DB)

Types

type LoginData

type LoginData struct {
	Role     string `json:"id"`
	Username string `json:"username"`
}

func AuthUser

func AuthUser(username, password string) (*LoginData, bool)

func IsUsernameExist

func IsUsernameExist(username string) (*LoginData, error)

Jump to

Keyboard shortcuts

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