Documentation ¶
Index ¶
- Constants
- Variables
- type Answer
- type Answers
- type Asset
- type Assets
- type CommandLineMod
- type CompileAssetsRequest
- type CompileAssetsResponse
- type Config
- type Configs
- type DefaultAssetsRequest
- type DefaultAssetsResponse
- type DefaultConfigRequest
- type DefaultConfigResponse
- type DependencyResolverMod
- type Entrypoint
- type GenerateDependenciesRequest
- type GenerateDependenciesResponse
- type GenerateDestinationRequest
- type GenerateDestinationResponse
- type GetQuestionsRequest
- type GetQuestionsResponse
- type HookType
- type Info
- type JobRunSpecData
- type Mod
- type Options
- type Plugin
- type Question
- type Questions
- type SubQuestion
- type Type
- type ValidateQuestionRequest
- type ValidateQuestionResponse
- type YamlMod
Constants ¶
Variables ¶
View Source
var ValidatorFactory = new(vFactory)
Functions ¶
This section is empty.
Types ¶
type CommandLineMod ¶
type CommandLineMod interface { // GetQuestions list down all the cli inputs required to generate spec files // name used for question will be directly mapped to DefaultConfig() parameters GetQuestions(context.Context, GetQuestionsRequest) (*GetQuestionsResponse, error) ValidateQuestion(context.Context, ValidateQuestionRequest) (*ValidateQuestionResponse, error) // DefaultConfig will be passed down to execution unit as env vars // they will be generated based on results of AskQuestions // if DryRun is true in PluginOptions, should not throw error for missing inputs DefaultConfig(context.Context, DefaultConfigRequest) (*DefaultConfigResponse, error) // DefaultAssets will be passed down to execution unit as files // if DryRun is true in PluginOptions, should not throw error for missing inputs DefaultAssets(context.Context, DefaultAssetsRequest) (*DefaultAssetsResponse, error) }
CommandLineMod needs to be implemented by plugins to interact with optimus CLI
type CompileAssetsRequest ¶
type CompileAssetsResponse ¶
type CompileAssetsResponse struct {
Assets Assets
}
type DefaultAssetsRequest ¶
type DefaultAssetsResponse ¶
type DefaultAssetsResponse struct {
Assets Assets `yaml:"defaultassets,omitempty"`
}
type DefaultConfigRequest ¶
type DefaultConfigResponse ¶
type DefaultConfigResponse struct {
Config Configs `yaml:"defaultconfig,omitempty"`
}
type DependencyResolverMod ¶
type DependencyResolverMod interface { // GetName returns name of the plugin GetName(context.Context) (string, error) // GenerateDestination derive destination from config and assets GenerateDestination(context.Context, GenerateDestinationRequest) (*GenerateDestinationResponse, error) // GenerateDependencies returns names of job destination on which this unit is dependent on GenerateDependencies(context.Context, GenerateDependenciesRequest) (*GenerateDependenciesResponse, error) // CompileAssets overrides default asset compilation CompileAssets(context.Context, CompileAssetsRequest) (*CompileAssetsResponse, error) }
DependencyResolverMod needs to be implemented for automatic dependency resolution of tasks
type Entrypoint ¶
type GenerateDependenciesResponse ¶
type GenerateDependenciesResponse struct {
Dependencies []string
}
type GenerateDestinationResponse ¶
func (GenerateDestinationResponse) URN ¶
func (gdr GenerateDestinationResponse) URN() string
type GetQuestionsRequest ¶
type GetQuestionsResponse ¶
type GetQuestionsResponse struct {
Questions Questions `yaml:",omitempty"`
}
type Info ¶
type Info struct { // Name should as simple as possible with no special characters // should start with a character, better if all lowercase Name string Description string PluginType Type `yaml:",omitempty"` PluginMods []Mod `yaml:",omitempty"` PluginVersion string `yaml:",omitempty"` APIVersion []string `yaml:",omitempty"` // Image is the full path to docker container that will be scheduled for execution Image string // Entrypoint command which will be used to execute the plugin Entrypoint Entrypoint // DependsOn returns list of hooks this should be executed after DependsOn []string `yaml:",omitempty"` // PluginType provides the place of execution, could be before the transformation // after the transformation, etc HookType HookType `yaml:",omitempty"` }
type JobRunSpecData ¶
type Plugin ¶
type Plugin struct { // Mods apply multiple modifications to existing registered plugins which // can be used in different circumstances DependencyMod DependencyResolverMod YamlMod YamlMod }
Plugin is an extensible module implemented outside the core optimus boundaries
func (*Plugin) GetSurveyMod ¶
func (p *Plugin) GetSurveyMod() CommandLineMod
func (*Plugin) IsYamlPlugin ¶
type Question ¶
type Question struct { Name string `yaml:",omitempty"` Prompt string `yaml:",omitempty"` Help string `yaml:",omitempty"` Default string `yaml:",omitempty"` Multiselect []string `yaml:",omitempty"` SubQuestions []SubQuestion `yaml:",omitempty"` Regexp string `yaml:",omitempty"` ValidationError string `yaml:",omitempty"` MinLength int `yaml:",omitempty"` MaxLength int `yaml:",omitempty"` Required bool `yaml:",omitempty"` }
type SubQuestion ¶
type ValidateQuestionRequest ¶
type YamlMod ¶
type YamlMod interface { PluginInfo() *Info CommandLineMod }
Click to show internal directories.
Click to hide internal directories.