runtime

package
v0.0.0-...-27550df Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConvertCMDType = "convert"
	InitCMDType    = "init"
	LoginCMDType   = "login"
	LogoutCMDType  = "logout"
	PullCMDType    = "pull"
	PushCMDType    = "push"
	FetchCMDType   = "fetch"
)

Variables

This section is empty.

Functions

func GetCommand

func GetCommand(cmdName string, cfg *Config) (string, []string, string, error)

func RunCommand

func RunCommand(cmd string, args []string, stdoutFilePath string) error

func WriteConfig

func WriteConfig(cfg *Config, filename string) error

Types

type Command

type Command struct {
	Name       string   `yaml:"name"`
	CMD        []string `yaml:"cmd"`
	StdOutFile string   `yaml:"stdoutFile,omitempty"`
}

type Config

type Config struct {
	Platform string    `yaml:"platform"`
	Password string    `yaml:"password,omitempty"`
	Timeout  int       `yaml:"timeout"`
	CmdList  []Command `yaml:"cmdList"`
}

func GetDefaultConfig

func GetDefaultConfig(inputPlatform string) *Config

func OpenConfig

func OpenConfig(filepath string) (*Config, error)

Jump to

Keyboard shortcuts

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