Documentation
¶
Index ¶
- type AlreadyAssigned
- type AlreadyHasSettings
- type AssignmentNotFound
- type AssignmentStore
- func (as *AssignmentStore) CreateAssignment(a assignment.NewAssignment) (*assignment.Assignment, error)
- func (as *AssignmentStore) CreateSettings(s assignment.Settings) (*assignment.Settings, error)
- func (as *AssignmentStore) DeleteAssignment(id string) (bool, error)
- func (as *AssignmentStore) DeleteAssignments(ids []string) error
- func (as *AssignmentStore) GetAssignment(id string) (*assignment.Assignment, error)
- func (as *AssignmentStore) GetAssignments(p assignment.Params) (assignment.Assignments, error)
- func (as *AssignmentStore) GetSettings(jobID uint64) (*assignment.Settings, error)
- func (as *AssignmentStore) GetWhitelist(jobID uint64, workerID uint64) (*whitelist.Whitelist, error)
- func (as *AssignmentStore) SelectExpiredAssignments() (assignment.Assignments, error)
- func (as *AssignmentStore) UpdateAssignment(workerID, jobID, responseID uint64, status string) (bool, error)
- func (as *AssignmentStore) WorkerAlreadyAssigned(jobID uint64, workerID uint64) (bool, error)
- type NoRowErr
- type RecordsMismatch
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlreadyAssigned ¶
type AlreadyAssigned struct{}
func (AlreadyAssigned) Error ¶
func (err AlreadyAssigned) Error() string
type AlreadyHasSettings ¶
type AlreadyHasSettings struct{}
func (AlreadyHasSettings) Error ¶
func (err AlreadyHasSettings) Error() string
type AssignmentNotFound ¶
func (AssignmentNotFound) Error ¶
func (err AssignmentNotFound) Error() string
type AssignmentStore ¶
func NewAssignmentStore ¶
func NewAssignmentStore(db *sqlx.DB) *AssignmentStore
func (*AssignmentStore) CreateAssignment ¶
func (as *AssignmentStore) CreateAssignment(a assignment.NewAssignment) (*assignment.Assignment, error)
func (*AssignmentStore) CreateSettings ¶
func (as *AssignmentStore) CreateSettings(s assignment.Settings) (*assignment.Settings, error)
func (*AssignmentStore) DeleteAssignment ¶
func (as *AssignmentStore) DeleteAssignment(id string) (bool, error)
func (*AssignmentStore) DeleteAssignments ¶
func (as *AssignmentStore) DeleteAssignments(ids []string) error
func (*AssignmentStore) GetAssignment ¶
func (as *AssignmentStore) GetAssignment(id string) (*assignment.Assignment, error)
func (*AssignmentStore) GetAssignments ¶
func (as *AssignmentStore) GetAssignments(p assignment.Params) (assignment.Assignments, error)
func (*AssignmentStore) GetSettings ¶
func (as *AssignmentStore) GetSettings(jobID uint64) (*assignment.Settings, error)
func (*AssignmentStore) GetWhitelist ¶
func (*AssignmentStore) SelectExpiredAssignments ¶
func (as *AssignmentStore) SelectExpiredAssignments() (assignment.Assignments, error)
func (*AssignmentStore) UpdateAssignment ¶
func (as *AssignmentStore) UpdateAssignment(workerID, jobID, responseID uint64, status string) (bool, error)
func (*AssignmentStore) WorkerAlreadyAssigned ¶
func (as *AssignmentStore) WorkerAlreadyAssigned(jobID uint64, workerID uint64) (bool, error)
type RecordsMismatch ¶
type RecordsMismatch struct{}
func (RecordsMismatch) Error ¶
func (err RecordsMismatch) Error() string
type Storage ¶
type Storage interface { GetAssignments(assignment.Params) (assignment.Assignments, error) GetAssignment(id string) (*assignment.Assignment, error) CreateAssignment(assignment.NewAssignment) (*assignment.Assignment, error) GetSettings(jobID uint64) (*assignment.Settings, error) GetWhitelist(jobID uint64, workerID uint64) (*whitelist.Whitelist, error) WorkerAlreadyAssigned(jobID uint64, workerID uint64) (bool, error) DeleteAssignment(id string) (bool, error) DeleteAssignments(ids []string) error UpdateAssignment(workerID, jobID, responseID uint64, status string) (bool, error) CreateSettings(assignment.Settings) (*assignment.Settings, error) SelectExpiredAssignments() (assignment.Assignments, error) }
Click to show internal directories.
Click to hide internal directories.