types

package
v0.0.0-...-79640c9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Name        string            `yaml:"name"`
	Image       string            `yaml:"image"`
	Timeout     int64             `yaml:"timeout"`
	Command     []string          `yaml:"command"`
	OnTimeout   []string          `yaml:"on-timeout"`
	OnFailure   []string          `yaml:"on-failure"`
	Volumes     []string          `yaml:"volumes,omitempty"`
	Environment map[string]string `yaml:"environment,omitempty"`
}

Action is the basic executional unit for a workflow

type Base

type Base struct {
	Title string
}

Base is the base view model that others extend

type Get

type Get struct {
	ID string
}

Get is the base for all GET requests

type Hardware

type Hardware struct {
	ID     string
	Data   string
	Fields map[string]string
}

Hardware represents a worker hardware

type HardwareList

type HardwareList struct {
	Base
	Hardwares []Hardware
}

HardwareList is the view model for hardware list page

type Home

type Home struct {
	Base
	Message string
}

Home represents the view model for home page

type NewWorkflow

type NewWorkflow struct {
	TemplateID string            `json:"templateID"`
	Devices    map[string]string `json:"devices"`
}

NewWorkflow represents a create new workflow request

type Task

type Task struct {
	Name        string            `yaml:"name"`
	WorkerAddr  string            `yaml:"worker"`
	Actions     []Action          `yaml:"actions"`
	Volumes     []string          `yaml:"volumes"`
	Environment map[string]string `yaml:"environment"`
}

Task represents a task to be performed in a worflow

type Template

type Template struct {
	ID          string
	Name        string
	Data        string
	LastUpdated string
}

Template represents a workflow template

type TemplateList

type TemplateList struct {
	Base
	Templates []Template
}

TemplateList is the view model for template list page

type UpdateHardware

type UpdateHardware struct {
	ID   string
	Name string
	Data string
}

UpdateHardware represents an update request for a hardware

type UpdateTemplate

type UpdateTemplate struct {
	ID   string
	Name string
	Data string
}

UpdateTemplate represents an update request for a template

type Workflow

type Workflow struct {
	ID        string
	Name      string
	State     string
	CreatedAt string
	Template  string
	Timeout   string
	RawData   string
	Details   WorkflowDetails
}

Workflow represents a workflow

type WorkflowDefinition

type WorkflowDefinition struct {
	Data    string   `json:"data"`
	Devices []string `json:"devices"`
}

WorkflowDefinition defines the template data and device keys for that workflow

type WorkflowDetails

type WorkflowDetails struct {
	Version       string `yaml:"version"`
	Name          string `yaml:"name"`
	ID            string `yaml:"id"`
	GlobalTimeout int    `yaml:"global_timeout"`
	Tasks         []Task `yaml:"tasks"`
}

WorkflowDetails represents a workflow to be executed

type WorkflowList

type WorkflowList struct {
	Base
	Workflows []Workflow
}

WorkflowList is the view model for workflow list page

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL