models

package
v0.0.0-...-632f8f1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUser

func AddUser(u *Users) string

func DeleteUser

func DeleteUser(uid string) error

Types

type Users

type Users struct {
	Id       string `orm:"unique;size(10);pk;column(id)"form:"id"`
	Username string `orm:"size(10);column(username)"form:"username"`
	Gender   string `orm:"unique;size(10);default(null);column(gender)"form:"gender"`
	Age      int    `orm:"unique;size(10);default(null);column(age)"form:"age"`
	Address  string `orm:"unique;size(20);default(null);column(address)"form:"address"`
	Email    string `orm:"unique;size(50);default(null);column(email)"form:"email"`
	Phone    string `orm:"unique;size(50);default(null);column(phone)"form:"phone"`
}

func GetAllUsers

func GetAllUsers() ([]*Users, error)

func GetOneUser

func GetOneUser(uid string) (*Users, error)

func UpdateUser

func UpdateUser(uid string, users Users) (*Users, error)

Jump to

Keyboard shortcuts

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