Documentation ¶
Index ¶
- func PromChanLen(name string, length int64)
- func PromError(name string)
- func PromInfo(name string)
- type Dao
- func (d *Dao) AddCallback(c context.Context, cb *model.Callback) (err error)
- func (d *Dao) AddReport(ctx context.Context, r *model.Report) (id int64, err error)
- func (d *Dao) AddReportsCacheByMids(c context.Context, mrs map[int64][]*model.Report) (err error)
- func (d *Dao) AddTask(c context.Context, t *model.Task) (id int64, err error)
- func (d *Dao) AddTokenCache(c context.Context, id string, val *model.Report) (err error)
- func (d *Dao) AddTokensCache(c context.Context, values map[string]*model.Report) (err error)
- func (d *Dao) BeginTx(c context.Context) (*xsql.Tx, error)
- func (d *Dao) Businesses(c context.Context) (res map[int64]*model.Business, err error)
- func (d *Dao) Close() (err error)
- func (d *Dao) DelMiInvalid(c context.Context) (err error)
- func (d *Dao) DelMiUninstalled(c context.Context) (err error)
- func (d *Dao) DelReport(c context.Context, dt string) (rows int64, err error)
- func (d *Dao) DelReportCache(c context.Context, mid int64, appID int64, deviceToken string) (err error)
- func (d *Dao) DelTokenCache(c context.Context, id string) (err error)
- func (d *Dao) OppoMessage(c context.Context, info *model.PushInfo, m *oppo.Message) (res *oppo.Response, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) PubCallback(c context.Context, v []*model.Callback) (err error)
- func (d *Dao) PubReport(c context.Context, info *model.Report) (err error)
- func (d *Dao) PushFCM(ctx context.Context, info *model.PushInfo, scheme string, tokens []string) (res *fcm.Response, err error)
- func (d *Dao) PushHuawei(c context.Context, info *model.PushInfo, scheme string, tokens []string) (res *huawei.Response, err error)
- func (d *Dao) PushIPad(c context.Context, info *model.PushInfo, item *model.PushItem) (res *model.HTTPResponse, err error)
- func (d *Dao) PushIPhone(c context.Context, info *model.PushInfo, item *model.PushItem) (res *model.HTTPResponse, err error)
- func (d *Dao) PushJpush(c context.Context, info *model.PushInfo, scheme string, tokens []string) (res *jpush.PushResponse, err error)
- func (d *Dao) PushMi(c context.Context, info *model.PushInfo, scheme, tokens string) (res *model.HTTPResponse, err error)
- func (d *Dao) PushMiByMids(c context.Context, info *model.PushInfo, scheme, mids string) (res *model.HTTPResponse, err error)
- func (d *Dao) PushOppo(c context.Context, info *model.PushInfo, msgID string, tokens []string) (res *oppo.Response, err error)
- func (d *Dao) PushOppoOne(c context.Context, info *model.PushInfo, m *oppo.Message, token string) (res *oppo.Response, err error)
- func (d *Dao) Report(c context.Context, dt string) (r *model.Report, err error)
- func (d *Dao) ReportByID(c context.Context, id int64) (r *model.Report, err error)
- func (d *Dao) Reports(c context.Context, dts []string) (rs []*model.Report, err error)
- func (d *Dao) ReportsByID(c context.Context, ids []int64) (reports []*model.Report, err error)
- func (d *Dao) ReportsByMid(c context.Context, mid int64) (res []*model.Report, err error)
- func (d *Dao) ReportsByMids(c context.Context, mids []int64) (reports map[int64][]*model.Report, err error)
- func (d *Dao) ReportsCacheByMid(c context.Context, mid int64) (res []*model.Report, err error)
- func (d *Dao) ReportsCacheByMids(c context.Context, mids []int64) (res map[int64][]*model.Report, missed []int64, err error)
- func (d *Dao) SetSetting(c context.Context, mid int64, st map[int]int) (err error)
- func (d *Dao) Setting(c context.Context, mid int64) (st map[int]int, err error)
- func (d *Dao) Task(c context.Context, taskID string) (t *model.Task, err error)
- func (d *Dao) TokenCache(c context.Context, id string) (res *model.Report, err error)
- func (d *Dao) TokensCache(ctx context.Context, tokens []string) (res map[string]*model.Report, missed []string, err error)
- func (d *Dao) TxTaskByPlatform(tx *xsql.Tx, platform int) (t *model.Task, err error)
- func (d *Dao) TxUpdateTaskStatus(tx *xsql.Tx, taskID string, status int8) (err error)
- func (d *Dao) UpdateReport(ctx context.Context, r *model.Report) (err error)
- func (d *Dao) UpdateTaskProgress(c context.Context, taskID string, p *model.Progress) (err error)
- func (d *Dao) UpdateTaskStatus(c context.Context, taskID string, status int8) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao .
func (*Dao) AddCallback ¶
AddCallback adds callback.
func (*Dao) AddReportsCacheByMids ¶
AddReportsCacheByMids add report cache by mids.
func (*Dao) AddTokenCache ¶
AddTokenCache Set data to mc
func (*Dao) AddTokensCache ¶
AddTokensCache Set data to mc
func (*Dao) Businesses ¶
Businesses gets all business info.
func (*Dao) DelMiUninstalled ¶
DelMiUninstalled deletes mi uninstalled tokens.
func (*Dao) DelReportCache ¶
func (d *Dao) DelReportCache(c context.Context, mid int64, appID int64, deviceToken string) (err error)
DelReportCache delete report cache.
func (*Dao) DelTokenCache ¶
DelTokenCache delete data from mc
func (*Dao) OppoMessage ¶
func (d *Dao) OppoMessage(c context.Context, info *model.PushInfo, m *oppo.Message) (res *oppo.Response, err error)
OppoMessage saves oppo message content.
func (*Dao) PubCallback ¶
PubCallback add push arrive/click callback to databus.
func (*Dao) PushFCM ¶
func (d *Dao) PushFCM(ctx context.Context, info *model.PushInfo, scheme string, tokens []string) (res *fcm.Response, err error)
PushFCM .
func (*Dao) PushHuawei ¶
func (d *Dao) PushHuawei(c context.Context, info *model.PushInfo, scheme string, tokens []string) (res *huawei.Response, err error)
PushHuawei push huawei notifications.
func (*Dao) PushIPad ¶
func (d *Dao) PushIPad(c context.Context, info *model.PushInfo, item *model.PushItem) (res *model.HTTPResponse, err error)
PushIPad .
func (*Dao) PushIPhone ¶
func (d *Dao) PushIPhone(c context.Context, info *model.PushInfo, item *model.PushItem) (res *model.HTTPResponse, err error)
PushIPhone .
func (*Dao) PushJpush ¶
func (d *Dao) PushJpush(c context.Context, info *model.PushInfo, scheme string, tokens []string) (res *jpush.PushResponse, err error)
PushJpush push huawei notifications.
func (*Dao) PushMi ¶
func (d *Dao) PushMi(c context.Context, info *model.PushInfo, scheme, tokens string) (res *model.HTTPResponse, err error)
PushMi .
func (*Dao) PushMiByMids ¶
func (d *Dao) PushMiByMids(c context.Context, info *model.PushInfo, scheme, mids string) (res *model.HTTPResponse, err error)
PushMiByMids .
func (*Dao) PushOppo ¶
func (d *Dao) PushOppo(c context.Context, info *model.PushInfo, msgID string, tokens []string) (res *oppo.Response, err error)
PushOppo push oppo notifications.
func (*Dao) PushOppoOne ¶
func (d *Dao) PushOppoOne(c context.Context, info *model.PushInfo, m *oppo.Message, token string) (res *oppo.Response, err error)
PushOppoOne push oppo notifications.
func (*Dao) ReportByID ¶
ReportByID gets report by id.
func (*Dao) ReportsByID ¶
ReportsByID gets reports by mids.
func (*Dao) ReportsByMid ¶
ReportsByMid gets reports by mid.
func (*Dao) ReportsByMids ¶
func (d *Dao) ReportsByMids(c context.Context, mids []int64) (reports map[int64][]*model.Report, err error)
ReportsByMids gets reports by mids.
func (*Dao) ReportsCacheByMid ¶
ReportsCacheByMid gets reports cache by mid.
func (*Dao) ReportsCacheByMids ¶
func (d *Dao) ReportsCacheByMids(c context.Context, mids []int64) (res map[int64][]*model.Report, missed []int64, err error)
ReportsCacheByMids get report cache by mids.
func (*Dao) SetSetting ¶
SetSetting saves user notify settings.
func (*Dao) TokenCache ¶
TokenCache get data from mc
func (*Dao) TokensCache ¶
func (d *Dao) TokensCache(ctx context.Context, tokens []string) (res map[string]*model.Report, missed []string, err error)
TokensCache get reports cache by tokens
func (*Dao) TxTaskByPlatform ¶
TxTaskByPlatform gets prepared task by platform.
func (*Dao) TxUpdateTaskStatus ¶
TxUpdateTaskStatus updates task status by tx.
func (*Dao) UpdateReport ¶
UpdateReport update report.
func (*Dao) UpdateTaskProgress ¶
UpdateTaskProgress updates task's progress.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package apns2 is a go Apple Push Notification Service (APNs) provider that allows you to send remote notifications to your iOS, tvOS, and OS X apps, using the new APNs HTTP/2 network protocol.
|
Package apns2 is a go Apple Push Notification Service (APNs) provider that allows you to send remote notifications to your iOS, tvOS, and OS X apps, using the new APNs HTTP/2 network protocol. |