domain

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arg

type Arg struct {
	Name       string
	Usage      string
	Default    string
	InputEnvs  []string `yaml:"input_envs"`
	ScriptEnvs []string `yaml:"script_envs"`
	Required   bool
	Prompt     prompt.Prompt
	Validate   []Validate
}

type Config

type Config struct {
	Tasks       []Task
	InputEnvs   []string `yaml:"input_envs"`
	ScriptEnvs  []string `yaml:"script_envs"`
	Environment map[string]string
	Timeout     Timeout
	Quiet       *bool
}

type Flag

type Flag struct {
	Name       string
	Short      string
	Usage      string
	Default    string
	InputEnvs  []string `yaml:"input_envs"`
	ScriptEnvs []string `yaml:"script_envs"`
	Type       string
	Required   bool
	Prompt     prompt.Prompt
	Validate   []Validate
}

type GlobalFlags

type GlobalFlags struct {
	DryRun     bool
	Quiet      *bool
	WorkingDir string
}

type HasIsSet

type HasIsSet interface {
	IsSet(string) bool
}

type Require

type Require struct {
	Exec        []StrList
	Environment []StrList
}

type StrList

type StrList []string

func (*StrList) UnmarshalYAML

func (list *StrList) UnmarshalYAML(unmarshal func(interface{}) error) error

type Task

type Task struct {
	Name        string
	Short       string
	Description string
	Usage       string
	Flags       []Flag
	Args        []Arg
	InputEnvs   []string `yaml:"input_envs"`
	ScriptEnvs  []string `yaml:"script_envs"`
	Environment map[string]string
	Script      string
	Timeout     Timeout
	Require     Require
	Quiet       *bool
	Shell       []string
	Tasks       []Task
}

type Timeout

type Timeout struct {
	Duration  int
	KillAfter int `yaml:"kill_after"`
}

type Validate

type Validate struct {
	Type      string
	RegExp    string `yaml:"regexp"`
	MinLength int    `yaml:"min_length"`
	MaxLength int    `yaml:"max_length"`
	Prefix    string
	Suffix    string
	Contain   string
	Enum      []string

	Min int
	Max int
}

Jump to

Keyboard shortcuts

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