Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Form ¶
type Form struct {
Inputs []Input `json:"inputs"`
}
Form is the form that is used for plugins to specify their options.
type Input ¶
type Input struct { Name string `json:"name"` Type InputType `json:"type"` Default string `json:"default,omitempty"` Label string `json:"label"` Options []string `json:"options,omitempty"` Required bool `json:"required"` Description string `json:"description,omitempty"` }
Input is a Form input. The response is tested by go-playground/validate to ensure the input is valid.
type Task ¶
type Task struct { Plugin string `json:"plugin" gorm:"<-:create;notnull"` Node string `json:"node" gorm:"<-:create;notnull"` Details map[string]string `json:"details" gorm:"<-:create;"` }
Task is a safe version of models.Task.
type TaskPluginInterface ¶
type TaskPluginInterface interface { // GetCommand returns the command to run the server. GetCommand(Task) (string, error) // GetInputs returns the inputs that the plugin takes. // GetInputs([]byte) ([]byte, error) TODO: add support for customizing inputs based on metadata GetInputs() Form }
TaskPluginInterface defines the interface used by task plugins.
Click to show internal directories.
Click to hide internal directories.