Documentation
¶
Overview ¶
====================================================
# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : curd.go # Created : 2019/1/21 14:40 # Last Modified : 2019/1/21 14:40 # Describe : # # ====================================================
====================================================
# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : msg.go # Created : 2019/1/28 11:37 # Last Modified : 2019/1/28 11:37 # Describe : # # ====================================================
====================================================
# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : template.go # Created : 2019/1/15 15:39 # Last Modified : 2019/1/15 15:39 # Describe : # # ====================================================
====================================================
# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : var.go # Created : 2019/1/14 14:26 # Last Modified : 2019/1/14 14:26 # Describe : # # ====================================================
Index ¶
- Variables
- func Commit(tx *sqlx.Tx) error
- func DetailByKey(ctx context.Context, key string, page int) ([]*meta.DbMsg, error)
- func DetailByToAndPage(ctx context.Context, to string, page int) ([]*meta.DbMsg, error)
- func RollBack(tx *sqlx.Tx) error
- func TemplateInsert(ctx context.Context, templ *tpl.DBTemplate) (*sqlx.Tx, error)
- func TemplateList(ctx context.Context) (res []*tpl.DBTemplate, err error)
- func UpdateAndInsertMsgBatch(ctx context.Context, ds []*meta.DbMsg) error
- func WaitingMsgByKey(ctx context.Context, key string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoRowsEffected = errors.New("db: no rows affected") ErrUniqueKeyExsits = errors.New("db: Duplicate entry for key") )
Functions ¶
func DetailByKey ¶
DetailByKey 根据key分页查询
func DetailByToAndPage ¶
DetailByToAndPage 根据接收人的标识分页查询
func TemplateInsert ¶
TemplateInsert 插入消息模板到数据库,如果唯一键重复返回键已存在错误
func TemplateList ¶
func TemplateList(ctx context.Context) (res []*tpl.DBTemplate, err error)
TemplateList 获取所有模板
func UpdateAndInsertMsgBatch ¶
UpdateAndInsertMsgBatch 批量执行修改,如果不存在就插入
Types ¶
This section is empty.