Documentation
¶
Index ¶
- Variables
- type Agent
- type AgentService
- func (as *AgentService) Add(agent Agent) (int64, error)
- func (as *AgentService) Delete(id int64) error
- func (as *AgentService) DisactivateAll() error
- func (as *AgentService) GetAll(limit, offset int) ([]Agent, error)
- func (as *AgentService) GetById(id int64) (Agent, error)
- func (as *AgentService) Update(agent Agent) error
- type Task
- type TaskService
- func (ts *TaskService) Add(task Task) (int64, error)
- func (ts *TaskService) Delete(id int64) error
- func (ts *TaskService) GetAllForUser(userId int64, limit, offset int) ([]Task, error)
- func (ts *TaskService) GetAllPending() ([]TaskWithTimeouts, error)
- func (ts *TaskService) GetById(id int64) (Task, error)
- func (ts *TaskService) GetExecutingForAgent(id int64) ([]TaskWithTimeouts, error)
- func (ts *TaskService) SetPendingForDisactiveAgents() error
- func (ts *TaskService) SetUnexecutingForAgent(id int64) error
- func (ts *TaskService) Update(task Task) error
- type TaskStatus
- type TaskWithTimeouts
- type Timeouts
- type TimeoutsSerice
- type User
- type UserService
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultTimeouts = Timeouts{}
)
Functions ¶
This section is empty.
Types ¶
type AgentService ¶
type AgentService struct {
// contains filtered or unexported fields
}
func NewAgentService ¶
func NewAgentService(pool *pgxpool.Pool) (*AgentService, error)
func (*AgentService) Delete ¶
func (as *AgentService) Delete(id int64) error
func (*AgentService) DisactivateAll ¶
func (as *AgentService) DisactivateAll() error
func (*AgentService) Update ¶
func (as *AgentService) Update(agent Agent) error
type TaskService ¶
type TaskService struct {
// contains filtered or unexported fields
}
func NewTaskService ¶
func NewTaskService(pool *pgxpool.Pool) (*TaskService, error)
func (*TaskService) Delete ¶
func (ts *TaskService) Delete(id int64) error
func (*TaskService) GetAllForUser ¶
func (ts *TaskService) GetAllForUser(userId int64, limit, offset int) ([]Task, error)
func (*TaskService) GetAllPending ¶
func (ts *TaskService) GetAllPending() ([]TaskWithTimeouts, error)
func (*TaskService) GetExecutingForAgent ¶
func (ts *TaskService) GetExecutingForAgent(id int64) ([]TaskWithTimeouts, error)
func (*TaskService) SetPendingForDisactiveAgents ¶
func (ts *TaskService) SetPendingForDisactiveAgents() error
func (*TaskService) SetUnexecutingForAgent ¶
func (ts *TaskService) SetUnexecutingForAgent(id int64) error
func (*TaskService) Update ¶
func (ts *TaskService) Update(task Task) error
type TaskStatus ¶
type TaskStatus string
var ( TaskStatusPending TaskStatus = "pending" TaskStatusExecuting TaskStatus = "executing" TaskStatusSuccess TaskStatus = "success" TaskStatusError TaskStatus = "error" )
type TaskWithTimeouts ¶
type TimeoutsSerice ¶
type TimeoutsSerice struct {
// contains filtered or unexported fields
}
func NewTimeoutsService ¶
func NewTimeoutsService(pool *pgxpool.Pool) (*TimeoutsSerice, error)
func (*TimeoutsSerice) Add ¶
func (ts *TimeoutsSerice) Add(timeouts Timeouts) error
func (*TimeoutsSerice) GetForUser ¶
func (ts *TimeoutsSerice) GetForUser(userId int64) (Timeouts, error)
func (*TimeoutsSerice) Put ¶
func (ts *TimeoutsSerice) Put(timeouts Timeouts) error
Add if not exists, update if exists
func (*TimeoutsSerice) Update ¶
func (ts *TimeoutsSerice) Update(timeouts Timeouts) error
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(pool *pgxpool.Pool) (*UserService, error)
func (*UserService) GetByLogin ¶
func (us *UserService) GetByLogin(login string) (User, error)
Click to show internal directories.
Click to hide internal directories.