Documentation ¶
Index ¶
- Constants
- Variables
- type Controller
- func (taskController *Controller) AddTask(taskIn Task)
- func (taskController *Controller) GetTaskDetail(taskView View) Task
- func (taskController *Controller) GetTaskHistory(taskView View) []RunInstance
- func (taskController *Controller) GetTasksViews() []View
- func (taskController *Controller) RunTask(taskView View, data Data)
- type Dao
- type Data
- type DataHTTP
- type MapStoreDao
- type RunInstance
- type Schema
- type Task
- func (taskSelf *Task) AddSchemaField(name, dataType string)
- func (taskSelf Task) CopyView() View
- func (taskSelf *Task) Equals(taskOther *Task) bool
- func (selfTask *Task) GetTaskCommandString() string
- func (taskSelf *Task) Run(data Data) bytes.Buffer
- func (selfTask *Task) SetTaskProcess(path string, arguments []string) error
- type TaskAndData
- type TaskDataRuns
- type TaskHTTP
- type View
- type ViewAndDataHTTP
- type ViewHTTP
- type ViewsHTTP
Constants ¶
const LIMIT_PATH = "C:/"
Variables ¶
var ABS_LIMIT_PATH string
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
Dao Dao
}
func NewController ¶
func NewController(dao Dao) *Controller
func (*Controller) AddTask ¶
func (taskController *Controller) AddTask(taskIn Task)
func (*Controller) GetTaskDetail ¶
func (taskController *Controller) GetTaskDetail(taskView View) Task
func (*Controller) GetTaskHistory ¶
func (taskController *Controller) GetTaskHistory(taskView View) []RunInstance
func (*Controller) GetTasksViews ¶
func (taskController *Controller) GetTasksViews() []View
func (*Controller) RunTask ¶
func (taskController *Controller) RunTask(taskView View, data Data)
type Dao ¶
type Dao interface { GetTasksViews() []View GetTaskDetail(View) Task GetTaskHistory(View) []RunInstance AddTask(Task) // AddRunInstance(RunInstance) AddTaskRun(taskName string, newRunInstance RunInstance) }
Dao is the interface for all TaskDaos.
type DataHTTP ¶
type DataHTTP struct {
Data Data `json:"data"`
}
DataHTTP used to wrap Data to be sent as json over the wire.
type MapStoreDao ¶
type MapStoreDao struct {
Store map[string]*TaskDataRuns
}
This is EXTREMELY not thread safe right now.
func NewMapStoreDao ¶
func NewMapStoreDao() *MapStoreDao
func (*MapStoreDao) AddTask ¶
func (dao *MapStoreDao) AddTask(taskIn Task)
func (*MapStoreDao) AddTaskRun ¶
func (dao *MapStoreDao) AddTaskRun( taskName string, newRunInstance RunInstance)
func (*MapStoreDao) GetTaskDetail ¶
func (dao *MapStoreDao) GetTaskDetail(view View) Task
func (*MapStoreDao) GetTaskHistory ¶
func (dao *MapStoreDao) GetTaskHistory(view View) []RunInstance
func (*MapStoreDao) GetTasksViews ¶
func (dao *MapStoreDao) GetTasksViews() []View
GetTasksView returns a small view of all the tasks.
type RunInstance ¶
RunInstance is used to represent a single instance of a running of a task.
type Schema ¶
type Schema struct { // TODO probably need to rethink this. FieldNameToDataType map[string]string `json:"nameToType"` }
Schema is used to represent what data a Task contains.
type Task ¶
Task is used to represent a task, including schema and data.
func (*Task) AddSchemaField ¶
AddSchemaField adds detail to the schema.
func (*Task) GetTaskCommandString ¶
type TaskAndData ¶
TaskAndData is used mostly to retrieve the data from the Post request made.
type TaskDataRuns ¶
type TaskDataRuns struct { Task Task RunInstances []RunInstance }
TaskDataRuns is a struct that contains a task along with its run instances.
type TaskHTTP ¶
TaskHTTP is a 'task' just wrapped as one field to be used by http to send it as json over the wire.
type View ¶
type View struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` }
View is used to represent a simple high level view of a Task.