services

package
v0.0.0-...-ee036f0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAUser

func DeleteAUser(db *gorm.DB, uid uint32) (int64, error)

func FindAllUsers

func FindAllUsers(db *gorm.DB) (*[]User, error)

func Prepare

func Prepare(u User)

Types

type CustomErrors

type CustomErrors struct {
	Message string
	Key     string
}

func Validate

func Validate(u User, action string) []CustomErrors

type User

type User = models.User

func BeforeSave

func BeforeSave(u User) (*User, error)

func FindUserByID

func FindUserByID(u User, db *gorm.DB, uid uint32) (*User, error)

func SaveUser

func SaveUser(u User, db *gorm.DB) (*User, error)

func UpdateAUser

func UpdateAUser(u User, db *gorm.DB, uid uint32) (*User, error)

Jump to

Keyboard shortcuts

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