Models

package
v0.0.0-...-95a22fc Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(user *User) (err error)

CreateUser ... Insert New data

func DeleteUser

func DeleteUser(user *User, id string) (err error)

DeleteUser ... Delete user

func GetAllUsers

func GetAllUsers(user *[]User) (err error)

GetAllUsers Fetch all user data

func GetUserByID

func GetUserByID(user *User, id string) (err error)

GetUserByID ... Fetch only one user by Id

func UpdateUser

func UpdateUser(user *User, id string) (err error)

UpdateUser ... Update user

Types

type User

type User struct {
	Id      uint   `json:"id"`
	Name    string `json:"name"`
	Email   string `json:"email"`
	Phone   string `json:"phone"`
	Address string `json:"address"`
}

func (*User) TableName

func (b *User) TableName() string

Jump to

Keyboard shortcuts

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