configloader

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GOOS   string = runtime.GOOS
	GOARCH string = runtime.GOARCH
)

Functions

func GetDtmMD5FileName

func GetDtmMD5FileName() string

GetDtmMD5FileName format likes dtm-linux-amd64

func GetPluginFileName

func GetPluginFileName(t *Tool) string

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

func GetPluginMD5FileName(t *Tool) string

GetPluginMD5FileName If the plugin {githubactions 0.0.1}, the generated name will be "githubactions_0.0.1.md5"

Types

type Config

type Config struct {
	Tools []Tool `yaml:"tools"`
}

Config is the struct for loading DevStream configuration YAML files.

func LoadConf

func LoadConf(fname string) *Config

LoadConf reads an input file as a Config struct.

type Tool

type Tool struct {
	// 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
	Name      string                 `yaml:"name"`
	Plugin    string                 `yaml:"plugin"`
	DependsOn []string               `yaml:"dependsOn"`
	Options   map[string]interface{} `yaml:"options"`
}

Tool is the struct for one section of the DevStream configuration file.

func (*Tool) DeepCopy

func (t *Tool) DeepCopy() *Tool

Jump to

Keyboard shortcuts

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