Documentation ¶
Index ¶
- Variables
- type Config
- type CoreConfig
- type Manager
- type RawOptions
- type State
- type StateConfigOptions
- type Tool
- func (t *Tool) DeepCopy() *Tool
- func (t *Tool) GetPluginFileName() string
- func (t *Tool) GetPluginFileNameWithOSAndArch(os, arch string) string
- func (t *Tool) GetPluginMD5FileName() string
- func (t *Tool) GetPluginMD5FileNameWithOSAndArch(os, arch string) string
- func (t *Tool) GetPluginName() string
- func (t *Tool) GetPluginNameWithOSAndArch(os, arch string) string
- func (t *Tool) KeyWithNameAndInstanceID() string
- func (t *Tool) String() string
- type Tools
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Config CoreConfig `yaml:"config"` Vars map[string]any `yaml:"vars"` Tools Tools `yaml:"tools"` }
Config is a general config in DevStream.
type CoreConfig ¶
type CoreConfig struct {
State *State `yaml:"state"`
}
type Manager ¶
type Manager struct {
ConfigFilePath string
}
Manager is used to load the config file from the ConfigFilePath and finally get the Config object.
func NewManager ¶
NewManager takes configFilePath, then return a *Manager object.
func (*Manager) LoadConfig ¶
LoadConfig is the only method that the caller of Manager needs to be concerned with, and this method returns a *Config finally. The main workflow of this method is: 1. Get the original config from the config file specified by ConfigFilePath; 2. Validation.
type RawOptions ¶ added in v0.10.0
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 k8s 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 RawOptions `yaml:"options"` }
Tool is the struct for one section of the DevStream tool file (part of the config.)
func (*Tool) GetPluginFileName ¶ added in v0.10.0
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 (*Tool) GetPluginFileNameWithOSAndArch ¶ added in v0.10.0
func (*Tool) GetPluginMD5FileName ¶ added in v0.10.0
func (*Tool) GetPluginMD5FileNameWithOSAndArch ¶ added in v0.10.0
func (*Tool) GetPluginName ¶ added in v0.10.0
GetPluginName return plugin name without file extensions