Documentation
¶
Index ¶
- Variables
- func ResetStorage()
- type Command
- func (t *Command) AddMessage(m *Message)
- func (t *Command) AddTask(task *Task)
- func (t *Command) GetAuthor() string
- func (t *Command) GetClosedAt() time.Time
- func (t *Command) GetCmd() string
- func (t *Command) GetCreatedAt() time.Time
- func (t *Command) GetData() *CommandResults
- func (t *Command) GetId() int64
- func (t *Command) GetIdHex() string
- func (t *Command) GetTaskById(id int64) *Task
- func (t *Command) SetAuthor(author string)
- func (t *Command) SetClosedAt(closedAt time.Time)
- func (t *Command) SetCmd(cmd string)
- func (t *Command) SetCreatedAt(createdAt time.Time)
- func (t *Command) SetId(id int64)
- func (t *Command) UpdateTask(task *Task)
- type CommandResults
- type Message
- func (m *Message) GetCreatedAt() time.Time
- func (m *Message) GetId() int64
- func (m *Message) GetKind() shared.TaskMessage
- func (m *Message) GetMessage() string
- func (m *Message) SetCreatedAt(t time.Time)
- func (m *Message) SetId(id int64)
- func (m *Message) SetKind(kind shared.TaskMessage)
- func (m *Message) SetMessage(message string)
- func (m *Message) String() string
- type Task
- func (t *Task) GetCapability() shared.Capability
- func (t *Task) GetCreatedAt() time.Time
- func (t *Task) GetId() int64
- func (t *Task) GetIdHex() string
- func (t *Task) GetIdStr() string
- func (t *Task) GetIsBinary() bool
- func (t *Task) GetIsOutputBig() bool
- func (t *Task) GetOutput() []byte
- func (t *Task) GetOutputLen() uint64
- func (t *Task) GetOutputString() string
- func (t *Task) GetStatus() shared.TaskStatus
- func (t *Task) SetCapability(cap shared.Capability)
- func (t *Task) SetCreatedAt(createdAt time.Time)
- func (t *Task) SetId(id int64)
- func (t *Task) SetIsBinary(flag bool)
- func (t *Task) SetIsOutputBig(flag bool)
- func (t *Task) SetOutput(data []byte)
- func (t *Task) SetOutputLen(length uint64)
- func (t *Task) SetStatus(status shared.TaskStatus)
- func (t *Task) StringStatus() string
- type TaskData
Constants ¶
This section is empty.
Variables ¶
View Source
var Commands = &commandsMapper{ sorted: &commands{ commands: make([]*Command, 0), }, }
commands storage in runtime
Functions ¶
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
command information
func (*Command) AddMessage ¶
func (*Command) GetClosedAt ¶
func (*Command) GetCreatedAt ¶
func (*Command) GetData ¶
func (t *Command) GetData() *CommandResults
func (*Command) GetTaskById ¶
func (*Command) SetClosedAt ¶
func (*Command) SetCreatedAt ¶
func (*Command) UpdateTask ¶
type CommandResults ¶
type CommandResults struct {
// contains filtered or unexported fields
}
command's results (tasks and messages)
func (*CommandResults) AddMessage ¶
func (t *CommandResults) AddMessage(m *Message)
AddMessage saves command's message to storage
func (*CommandResults) AddTask ¶
func (t *CommandResults) AddTask(task *Task)
AddTask adds command's task to storage
func (*CommandResults) GetTaskById ¶
func (t *CommandResults) GetTaskById(id int64) *Task
GetTaskById returns task by ID
func (*CommandResults) UpdateTask ¶
func (t *CommandResults) UpdateTask(v *Task)
UpdateTask updates task in storage
type Message ¶
type Message struct { TaskData // contains filtered or unexported fields }
Message implements TaskData interface and stores infromation about command's message
func (*Message) GetCreatedAt ¶
func (*Message) GetKind ¶
func (m *Message) GetKind() shared.TaskMessage
func (*Message) GetMessage ¶
func (*Message) SetCreatedAt ¶
func (*Message) SetKind ¶
func (m *Message) SetKind(kind shared.TaskMessage)
func (*Message) SetMessage ¶
type Task ¶
type Task struct { TaskData // contains filtered or unexported fields }
Task implements TaskData interface and stores infromation about command's task
func (*Task) GetCapability ¶
func (t *Task) GetCapability() shared.Capability
func (*Task) GetCreatedAt ¶
func (*Task) GetIsBinary ¶
func (*Task) GetIsOutputBig ¶
func (*Task) GetOutputLen ¶
func (*Task) GetOutputString ¶
func (*Task) GetStatus ¶
func (t *Task) GetStatus() shared.TaskStatus
func (*Task) SetCapability ¶
func (t *Task) SetCapability(cap shared.Capability)
func (*Task) SetCreatedAt ¶
func (*Task) SetIsBinary ¶
func (*Task) SetIsOutputBig ¶
func (*Task) SetOutputLen ¶
func (*Task) SetStatus ¶
func (t *Task) SetStatus(status shared.TaskStatus)
func (*Task) StringStatus ¶
Click to show internal directories.
Click to hide internal directories.