Documentation ¶
Index ¶
- type Dao
- func (d *Dao) AddEventLog(eventLog *model.EventLog) error
- func (d *Dao) AddHookURL(hookURL *model.HookUrl) error
- func (d *Dao) AddHookURLandEvent(hookURL *model.HookUrl, urlEvents []*model.UrlEvent) (err error)
- func (d *Dao) AddURLEvent(urlEvent *model.UrlEvent) error
- func (d *Dao) CallHookUrl(c context.Context, URL string, body interface{}) (err error)
- func (d *Dao) CallHookUrlAsForm(c context.Context, URL string, body map[string]interface{}) (err error)
- func (d *Dao) Close()
- func (d *Dao) FindEventLogs(req *model.QueryEventLogReq) (total int64, eventLogs []*model.EventLog, err error)
- func (d *Dao) FindHookURLs(req *model.QueryHookURLReq) (total int64, hookURLs []*model.HookUrl, err error)
- func (d *Dao) GetEnableHookURLFromCache(event model.Event) (hookURLs []*model.HookUrl, err error)
- func (d *Dao) GetEnableHookURLFromCacheAndSaveIfNot(event model.Event) (hookURLs []*model.HookUrl, err error)
- func (d *Dao) GetEnableHookURLFromDB(event model.Event) (hookURLs []*model.HookUrl, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) QueryHookURLByID(id int64) (hookURL *model.HookUrl, err error)
- func (d *Dao) QueryURLEventByEventAndStatus(event string, status int) (urlEvents []*model.UrlEvent, err error)
- func (d *Dao) QueryURLEventByStatus(status int) (urlEvents []*model.UrlEvent, err error)
- func (d *Dao) QueryURLEventByUrl(urlID int64) (urlEvents []*model.UrlEvent, err error)
- func (d *Dao) QueryURLEventByUrlAndEvent(urlID int64, eventType string) (urlEvents []*model.UrlEvent, err error)
- func (d *Dao) SaveEnableHookURLToCache() (eventMap map[string][]*model.HookUrl, err error)
- func (d *Dao) UpdateEventLog(eventLog *model.EventLog) error
- func (d *Dao) UpdateHookURL(hookURL *model.HookUrl) error
- func (d *Dao) UpdateHookURLandEvent(hookURL *model.HookUrl, urlEvents []*model.UrlEvent) (err error)
- func (d *Dao) UpdateURLEventStatus(id int64, status int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao dao.
func (*Dao) AddEventLog ¶
AddEventLog Add Event Log.
func (*Dao) AddHookURL ¶
AddHookURL Add Hook URL.
func (*Dao) AddHookURLandEvent ¶
AddHookURLandEvent Add Hook URL and Event.
func (*Dao) AddURLEvent ¶
AddURLEvent Add URL Event.
func (*Dao) CallHookUrl ¶
CallHookUrl Call Hook Url.
func (*Dao) CallHookUrlAsForm ¶
func (d *Dao) CallHookUrlAsForm(c context.Context, URL string, body map[string]interface{}) (err error)
CallHookUrlAsForm Call Hook Url As Form.
func (*Dao) FindEventLogs ¶
func (d *Dao) FindEventLogs(req *model.QueryEventLogReq) (total int64, eventLogs []*model.EventLog, err error)
FindEventLogs Find Event Logs.
func (*Dao) FindHookURLs ¶
func (d *Dao) FindHookURLs(req *model.QueryHookURLReq) (total int64, hookURLs []*model.HookUrl, err error)
FindHookURLs Find Hook URLs.
func (*Dao) GetEnableHookURLFromCache ¶
GetEnableHookURLFromCache Get Enable Hook URL From Cache.
func (*Dao) GetEnableHookURLFromCacheAndSaveIfNot ¶
func (d *Dao) GetEnableHookURLFromCacheAndSaveIfNot(event model.Event) (hookURLs []*model.HookUrl, err error)
GetEnableHookURLFromCacheAndSaveIfNot Get Enable Hook URL From Cache and save if not.
func (*Dao) GetEnableHookURLFromDB ¶
GetEnableHookURLFromDB Get Enable Hook URL From DB.
func (*Dao) QueryHookURLByID ¶
QueryHookURLByID Query Hook URL By ID.
func (*Dao) QueryURLEventByEventAndStatus ¶
func (d *Dao) QueryURLEventByEventAndStatus(event string, status int) (urlEvents []*model.UrlEvent, err error)
QueryURLEventByEventAndStatus Query URL Event By Event and status.
func (*Dao) QueryURLEventByStatus ¶
QueryURLEventByStatus Query URL Event By Status.
func (*Dao) QueryURLEventByUrl ¶
QueryURLEventByUrl Query URL Event By Url.
func (*Dao) QueryURLEventByUrlAndEvent ¶
func (d *Dao) QueryURLEventByUrlAndEvent(urlID int64, eventType string) (urlEvents []*model.UrlEvent, err error)
QueryURLEventByUrlAndEvent Query URL Event By Url And Event.
func (*Dao) SaveEnableHookURLToCache ¶
SaveEnableHookURLToCache Save Enable Hook URL To Cache.
func (*Dao) UpdateEventLog ¶
UpdateEventLog Update Event Log.
func (*Dao) UpdateHookURL ¶
UpdateHookURL Update Hook URL.