Documentation ¶
Index ¶
- type Cleaner
- type DB
- func (db *DB) DeleteWorkData(ctx context.Context, id string) error
- func (db *DB) InsertRequest(ctx context.Context, req *persistence.ReqData) error
- func (db *DB) InsertStatus(ctx context.Context, item *persistence.Status) error
- func (db *DB) InsertWorkData(ctx context.Context, data *persistence.WorkData) error
- func (db *DB) Live(ctx context.Context) error
- func (db *DB) LoadRequest(ctx context.Context, id string) (*persistence.ReqData, error)
- func (db *DB) LoadStatus(ctx context.Context, id string) (*persistence.Status, error)
- func (db *DB) LoadWorkData(ctx context.Context, id string) (*persistence.WorkData, error)
- func (db *DB) LockEmailTable(ctx context.Context, ID string, key string) error
- func (db *DB) UnLockEmailTable(ctx context.Context, ID string, key string, value int) error
- func (db *DB) UpdateStatus(ctx context.Context, item *persistence.Status) error
- func (db *DB) UpdateWorkData(ctx context.Context, data *persistence.WorkData) error
- type DBIdsProvider
- type Sender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cleaner ¶
type Cleaner struct {
// contains filtered or unexported fields
}
Cleaner cleans all records related with ID
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB provides operations with postgresql
func (*DB) InsertRequest ¶
InsertRequest inserts request into DB
func (*DB) InsertStatus ¶
InsertStatus inserts status into DB
func (*DB) InsertWorkData ¶
InsertWorkData inserts data into DB
func (*DB) LoadRequest ¶
LoadRequest loads request from DB
func (*DB) LoadStatus ¶
LoadStatus loads work info from DB
func (*DB) LoadWorkData ¶
LoadWorkData loads work info from DB
func (*DB) LockEmailTable ¶
LockEmailTable inserts record to db and marks it as working
func (*DB) UnLockEmailTable ¶
UnLockEmailTable replaces table status with value
func (*DB) UpdateStatus ¶
UpdateStatus updates status into DB
func (*DB) UpdateWorkData ¶
UpdateWorkData updates workdata
type DBIdsProvider ¶
type DBIdsProvider struct {
// contains filtered or unexported fields
}
DBIdsProvider provides expired IDs from postgresql
func NewDBIdsProvider ¶
NewDB creates Request instance
func (*DBIdsProvider) GetExpired ¶
func (db *DBIdsProvider) GetExpired(ctx context.Context) ([]string, error)
InsertRequest inserts request into DB
Click to show internal directories.
Click to hide internal directories.