Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetPluginFileName ¶
GetPluginFileName creates the file name based on the tool's name and version If the plugin {githubactions 0.0.1}, the generated name will be "githubactions_0.0.1.so"
func GetPluginMD5FileName ¶
GetPluginMD5FileName If the plugin {githubactions 0.0.1}, the generated name will be "githubactions_0.0.1.md5"
func GetPluginName ¶
GetPluginName return plugin name without file extensions
Types ¶
type Config ¶
Config records rendered config values and is used as a general config in DevStream.
func (*Config) ValidateDependency ¶
type CoreConfig ¶
type CoreConfig struct { // TODO(daniel-hutao): Relative path support VarFile string `yaml:"varFile"` // TODO(daniel-hutao): Relative path support ToolFile string `yaml:"toolFile"` // abs path of the plugin dir PluginDir string `yaml:"pluginDir"` State *State `yaml:"state"` }
CoreConfig is the struct representing the complete original configuration YAML files.
func (*CoreConfig) ParseToolFilePath ¶
func (c *CoreConfig) ParseToolFilePath() error
func (*CoreConfig) ParseVarFilePath ¶
func (c *CoreConfig) ParseVarFilePath() error
func (*CoreConfig) Validate ¶
func (c *CoreConfig) Validate() error
type Manager ¶
type Manager struct {
ConfigFile string
}
func NewManager ¶
func (*Manager) LoadConfig ¶
LoadConfig reads an input file as a general config.
type State ¶
type State struct { Backend string `yaml:"backend"` Options StateConfigOptions `yaml:"options"` }
State is the struct for reading the state configuration in the config file. It defines how the state is stored, specifies the type of backend and related options.
type StateConfigOptions ¶
type StateConfigOptions struct { // for s3 backend Bucket string `yaml:"bucket"` Region string `yaml:"region"` Key string `yaml:"key"` // for local backend StateFile string `yaml:"stateFile"` // for ConfigMap backend Namespace string `yaml:"namespace"` ConfigMap string `yaml:"configmap"` }
StateConfigOptions is the struct for reading the options of the state backend.
type Tool ¶
type Tool struct { Name string `yaml:"name" validate:"required"` // RFC 1123 - DNS Subdomain Names style // contain no more than 253 characters // contain only lowercase alphanumeric characters, '-' or '.' // start with an alphanumeric character // end with an alphanumeric character InstanceID string `yaml:"instanceID" validate:"required,dns1123subdomain"` DependsOn []string `yaml:"dependsOn"` Options map[string]interface{} `yaml:"options"` }
Tool is the struct for one section of the DevStream tool file (part of the config.)