Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = fmt.Errorf("not found") ErrTooManyHits = fmt.Errorf("found too many hits") )
View Source
var AllStatus = []Status{ StatusStatusless, StatusFailed, StatusNotStarted, StatusRunning, StatusEnded, StatusCanceled, }
Functions ¶
Types ¶
type Dbal ¶
type Dbal interface { // newConnection create a connection and store it NewConnection(address string) error // Ping try to get info from the nodes and return an error if it failed Ping() error // CreateIndexes initialize needed indexes CreateIndexes(ctx context.Context) error // User index methods: GetUserByEmail(ctx context.Context, email string) (User, error) GetUserByID(ctx context.Context, id string) (User, error) CreateUser(ctx context.Context, user User) error DeleteUser(ctx context.Context, id string) error // Task index methods: GetNextTask(ctx context.Context) (*Task, error) GetTasksByUserID(ctx context.Context, id string) ([]Task, error) UpdateTaskLogs(ctx context.Context, taskID string, logs string) error UpdateTaskStatus(ctx context.Context, taskID string, status Status) error DeleteTaskByID(ctx context.Context, id string) error DeleteTasksBysUserID(ctx context.Context, userId string) error CreateTask(ctx context.Context, task Task) error }
Dbal for DataBase Abstracted Layer
type ErrAlreadyExist ¶
type ErrAlreadyExist string
func (ErrAlreadyExist) Error ¶
func (e ErrAlreadyExist) Error() string
func (ErrAlreadyExist) Ptr ¶
func (e ErrAlreadyExist) Ptr() *ErrAlreadyExist
type Job ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.