dao

package
v0.0.0-...-c747ff1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MyUser database user name
	MyUser = "cloud"
	// Password database user password
	Password = "passwd"
	// Host database host ip
	Host = "192.168.1.61"
	// MPort database host port
	MPort = 3306
	// DbName database db name
	DbName = "mydb"
	// SUCCESS return value
	SUCCESS = "success"
	// Port listen port
	Port = "8080"
)

Variables

This section is empty.

Functions

func CreatePerson

func CreatePerson(person *table.Person) (err error)

func DB

func DB() *gorm.DB

func DeletePersonById

func DeletePersonById(personId int64) (err error)

func GetAllPerson

func GetAllPerson() (persons []*table.Person, err error)

func GetPersonById

func GetPersonById(personId int64) (person *table.Person, err error)

func UpdatePersonNameById

func UpdatePersonNameById(name string, personId int64) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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