Documentation ¶
Index ¶
- Constants
- func SyncQueueGet(db *sql.Connection, p *SyncQueueGetParam) (sqList []*model.SyncQueue, count int, err error)
- func SyncQueueGetByItemIDTypeAndService(db *sql.Connection, itemID int, itemType, service string) (sq *model.SyncQueue, err error)
- func SyncQueueGetByStatusService(db *sql.Connection, status, service []string, limit *uint64) (sqList []*model.SyncQueue, count int, err error)
- func SyncQueueGetItemIDsByServiceAndItemType(db *sql.Connection, limit, offset int, status []string, ...) (idList []int, count int, err error)
- func SyncQueueSetDelete(db *sql.Connection, id int, delete bool) (err error)
- func SyncQueueSetDeleteByServiceItemTypeAndItemID(db *sql.Connection, itemID int, itemType, service string, delete bool) (err error)
- func SyncQueueSetError(db *sql.Connection, id int, msg string) (err error)
- func SyncQueueSetHash(db *sql.Connection, id int, hash string) (err error)
- func SyncQueueSetItemHashAndStatus(db *sql.Connection, id int, hash, status string, item *[]byte) (err error)
- func SyncQueueSetStatus(db *sql.Connection, id int, status string) (err error)
- func SyncQueueSetStatusForAllByService(db *sql.Connection, serviceName string, status string) (err error)
- func Upsert(db *sql.Connection, input *model.SyncQueue) (id int, err error)
- type SyncQueueGetParam
Constants ¶
const ( SyncQueueTableName = "sync_queue" SyncQueueDefaultSortBy = "sync_queue_id" ECode060301 = e.Code0603 + "01" ECode060302 = e.Code0603 + "02" ECode060303 = e.Code0603 + "03" ECode060304 = e.Code0603 + "04" ECode060305 = e.Code0603 + "05" ECode060306 = e.Code0603 + "06" ECode060307 = e.Code0603 + "07" ECode060308 = e.Code0603 + "08" ECode060309 = e.Code0603 + "09" ECode06030A = e.Code0603 + "0A" ECode06030B = e.Code0603 + "0B" ECode06030C = e.Code0603 + "0C" ECode06030D = e.Code0603 + "0D" ECode06030E = e.Code0603 + "0E" ECode06030F = e.Code0603 + "0F" ECode06030G = e.Code0603 + "0G" ECode06030H = e.Code0603 + "0H" ECode06030I = e.Code0603 + "0I" )
Variables ¶
This section is empty.
Functions ¶
func SyncQueueGet ¶
func SyncQueueGet(db *sql.Connection, p *SyncQueueGetParam) (sqList []*model.SyncQueue, count int, err error)
SyncQueueGet performs select
func SyncQueueGetByItemIDTypeAndService ¶
func SyncQueueGetByItemIDTypeAndService(db *sql.Connection, itemID int, itemType, service string) (sq *model.SyncQueue, err error)
SyncQueueGetByItemIDTypeAndService searches by the item id
func SyncQueueGetByStatusService ¶
func SyncQueueGetByStatusService(db *sql.Connection, status, service []string, limit *uint64) (sqList []*model.SyncQueue, count int, err error)
SyncQueueGetByStatus returns the items with the specified status for the specified services
func SyncQueueGetItemIDsByServiceAndItemType ¶
func SyncQueueGetItemIDsByServiceAndItemType(db *sql.Connection, limit, offset int, status []string, itemType, service string) (idList []int, count int, err error)
SyncQueueGetItemIDsByServiceAndItemType Get list of all items IDs for a specified service
func SyncQueueSetDelete ¶
func SyncQueueSetDelete(db *sql.Connection, id int, delete bool) (err error)
SyncQueueSetDelete updates the delete flag
func SyncQueueSetDeleteByServiceItemTypeAndItemID ¶
func SyncQueueSetDeleteByServiceItemTypeAndItemID(db *sql.Connection, itemID int, itemType, service string, delete bool) (err error)
SyncQueueSetDeleteByServiceItemTypeAndItemID updates the delete flag
func SyncQueueSetError ¶
func SyncQueueSetError(db *sql.Connection, id int, msg string) (err error)
SyncQueueSetError set error for sync
func SyncQueueSetHash ¶
func SyncQueueSetHash(db *sql.Connection, id int, hash string) (err error)
SyncQueueSetHash sets the hash for the item to be synced
func SyncQueueSetItemHashAndStatus ¶
func SyncQueueSetItemHashAndStatus(db *sql.Connection, id int, hash, status string, item *[]byte) (err error)
SyncQueueSetItemHashAndStatus sets the item, hash for the item, and status to be synced
func SyncQueueSetStatus ¶
func SyncQueueSetStatus(db *sql.Connection, id int, status string) (err error)
SyncQueueSetStatus updates the status
func SyncQueueSetStatusForAllByService ¶
func SyncQueueSetStatusForAllByService(db *sql.Connection, serviceName string, status string) (err error)
SyncQueueSetStatusForAllByService updates the status for all items for the specified service
Types ¶
type SyncQueueGetParam ¶
type SyncQueueGetParam struct { Limit *uint64 Offset *uint64 ID *int ItemID *int Status *[]string Service *[]string ItemType *string ForDelete *bool FlagCount bool FlagForUpdate bool OrderByID string OrderByService string OrderByUpdatedOn string DataHandler func(*model.SyncQueue) error }
SyncQueueGetParam model