Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
PG_CLIENT = &gorm.DB{}
)
Functions ¶
func GetPgClient ¶
Types ¶
type PersonRoom ¶
type PgClient ¶
func (*PgClient) Delete ¶
func (p *PgClient) Delete() gin.HandlerFunc
delete use uniqKey name curl -X POST http://127.0.0.1:8080/pg/delete?name=lucy_home
func (*PgClient) Insert ¶
func (p *PgClient) Insert() gin.HandlerFunc
create if not have, insert by c.Query()
func (*PgClient) InsertJson ¶
func (p *PgClient) InsertJson() gin.HandlerFunc
insert by json body
{ "name": "lucy_home", "owner": "lucy", "net": true, "size": 40 }
func (*PgClient) Update ¶
func (p *PgClient) Update() gin.HandlerFunc
update with json body
{ "name": "lucy_home", "owner": "lucy", "net": false, "size": 50 }
Click to show internal directories.
Click to hide internal directories.