models

package
v0.0.0-...-3a8b1bb Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(db *gorm.DB, User *User) (err error)

create a user

func DeleteUser

func DeleteUser(db *gorm.DB, User *User, id int) (err error)

delete user

func GetUser

func GetUser(db *gorm.DB, User *User, id int) (err error)

get user by id

func GetUsers

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

get users

func UpdateUser

func UpdateUser(db *gorm.DB, User *User) (err error)

update user

Types

type User

type User struct {
	gorm.Model
	ID    int
	Name  string
	Email string
}

Jump to

Keyboard shortcuts

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