Documentation
¶
Index ¶
Constants ¶
View Source
const ( Enable = "Enable" Disable = "Disable" Delete = "Delete" )
View Source
const ( Pending = "Pending" Failure = "Failure" Success = "Success" )
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewDalInfoService, NewReportService)
Functions ¶
This section is empty.
Types ¶
type DalInfo ¶
type DalInfoService ¶
type DalInfoService interface { FindById(ctx context.Context, id int64) (dalInfo *DalInfo) FindByDalId(ctx context.Context, dalId string) (dalInfo *DalInfo) FindAll(ctx context.Context) (all []*DalInfo) Create(ctx context.Context, dalInfo *DalInfo) (err error) Update(ctx context.Context, dalInfo *DalInfo) (err error) }
func NewDalInfoService ¶
func NewDalInfoService(cfg config.Config, db *gorm.DB) DalInfoService
type Model ¶
type ReportHistory ¶
type ReportHistory struct { Model ReportId string `gorm:"not null"` Content string `gorm:"not null"` Url string `gorm:"not null"` ProductKey string `gorm:"not null"` Sn string `gorm:"not null"` RetryTimes int32 `gorm:"not null"` Status string `gorm:"not null"` LastSendTime *time.Time DalInfoId int64 `gorm:"not null"` Reason string }
func (*ReportHistory) TableName ¶
func (rh *ReportHistory) TableName() string
type ReportService ¶
type ReportService interface { ClearHistoryLog(ctx context.Context, date time.Time) bool FindHistory(ctx context.Context, id int64) *ReportHistory FindHistoryByReportId(ctx context.Context, reportId string) *ReportHistory CreateHistory(ctx context.Context, history *ReportHistory) error UpdateHistory(ctx context.Context, history *ReportHistory) error DeleteHistory(ctx context.Context, id int64) error FindRetryPage(ctx context.Context, page, size int) (total int64, records []*RetryRecord) CreateRetry(ctx context.Context, record *RetryRecord) error UpdateRetry(ctx context.Context, record *RetryRecord) error DeleteRetryByReportId(ctx context.Context, reportId int64) error }
func NewReportService ¶
func NewReportService(cfg config.Config, db *gorm.DB) ReportService
type RetryRecord ¶
type RetryRecord struct { Model ReportHistory *ReportHistory `gorm:"ForeignKey:ReportID;AssociationForeignKey:ID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` ReportID int64 `gorm:"uniqueIndex:idx_client_retry_record_report_id_next;not null"` Prev *time.Time Next *time.Time `gorm:"uniqueIndex:idx_client_retry_record_report_id_next,sort:asc"` RetryTimes int32 `gorm:"not null"` }
func (*RetryRecord) TableName ¶
func (rr *RetryRecord) TableName() string
type TransactionKey ¶
type TransactionKey struct{}
Click to show internal directories.
Click to hide internal directories.