Documentation ¶
Index ¶
- Variables
- func RegisterConverter[T any](zero T, converter func(string) (T, error))
- type BasicSelectable
- type Future
- func FutureFrom[T any](a T) Future[T]
- func FutureFromFunc[T any](f func() T) Future[T]
- func FutureFromFuncErr[T any](f func() (T, error)) Future[T]
- func FutureFromPtr[T any](a *T) Future[T]
- func FutureFromStringers[T Stringer](f Future[[]T]) Future[[]string]
- func FutureInterfacer[T any, I any](f Future[T]) Future[I]
- func FutureInterfacerArray[T any, I any](f Future[[]T]) Future[[]I]
- type HelmChart
- type HelmChartArray
- type HelmChartMulti
- type HelmChartMultiArray
- type HelmChartMultiVersion
- type HelmRelease
- type HelmRepo
- type Manifest
- type ManifestChart
- type ManifestRelease
- type ManifestRepo
- type ManifestSingle
- type ReleaseLock
- type Selectable
- type SelectableString
- type Stringer
- type StringerFunc
- type ToStringer
- type Validator
- func ConditionalValidator[T comparable](validator func(input T) Validator[T]) Validator[T]
- func EmptyValidator[T comparable](name string, empty bool) Validator[T]
- func EnvValidator() Validator[string]
- func EqualValidator[T comparable](format Stringer, future Future[[]T]) Validator[T]
- func MultiValidator[T any](validators ...Validator[T]) Validator[T]
- func NameValidator(name string, allowEmpty bool) Validator[string]
- func NotEqualValidator[T comparable](template Stringer, future Future[[]T]) Validator[T]
- func OptionalEmptyValidator[T comparable]() Validator[T]
- func PathValidator(name string, allowEmpty bool, allowDir bool, allowFile bool, allowStdIn bool) Validator[string]
- func UrlValidator(name string, allowEmpty bool) Validator[string]
- type ValidatorFunction
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidName = errors.New("must be lowercase alphanumeric characters or '-', and must start and end with an alphanumeric character") ErrInvalidURL = errors.New("must be a valid URL") ErrInvalidPathNotFound = errors.New("must be a valid path") ErrInvalidPathIsDir = errors.New("must be a file") ErrInvalidPathIsFile = errors.New("must be a directory") ErrValidtorStopValidation = errors.New("stop validation") )
View Source
var ( NameRegex = regexp.MustCompile(`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`) EnvRegex = regexp.MustCompile("^[a-zA-Z_]+[a-zA-Z0-9_]*$") UrlRegex = regexp.MustCompile(`^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)$`) )
View Source
var GlobalManifest = &Manifest{}
Functions ¶
func RegisterConverter ¶
Types ¶
type BasicSelectable ¶
func (BasicSelectable) Details ¶
func (b BasicSelectable) Details() string
func (BasicSelectable) Label ¶
func (b BasicSelectable) Label() string
func (BasicSelectable) Match ¶
func (b BasicSelectable) Match(input string) bool
func (BasicSelectable) Selected ¶
func (b BasicSelectable) Selected() string
type HelmChart ¶
type HelmChartArray ¶
type HelmChartArray []HelmChart
func (HelmChartArray) ToHelmChartMulti ¶
func (h HelmChartArray) ToHelmChartMulti() HelmChartMultiArray
type HelmChartMulti ¶
type HelmChartMulti struct { HelmChart Versions []HelmChartMultiVersion }
func (HelmChartMulti) FindVersion ¶
func (h HelmChartMulti) FindVersion(version string) HelmChartMultiVersion
func (HelmChartMulti) Selected ¶
func (m HelmChartMulti) Selected() string
type HelmChartMultiArray ¶
type HelmChartMultiArray []HelmChartMulti
func (HelmChartMultiArray) FindChart ¶
func (h HelmChartMultiArray) FindChart(chart string) HelmChartMulti
type HelmChartMultiVersion ¶
type HelmChartMultiVersion HelmChart
func (HelmChartMultiVersion) Details ¶
func (m HelmChartMultiVersion) Details() string
func (HelmChartMultiVersion) Label ¶
func (m HelmChartMultiVersion) Label() string
func (HelmChartMultiVersion) Match ¶
func (m HelmChartMultiVersion) Match(input string) bool
func (HelmChartMultiVersion) Name ¶
func (h HelmChartMultiVersion) Name() string
func (HelmChartMultiVersion) Repo ¶
func (h HelmChartMultiVersion) Repo() string
func (HelmChartMultiVersion) Selected ¶
func (m HelmChartMultiVersion) Selected() string
type HelmRelease ¶
type HelmRelease struct { Name string `json:"name"` Namespace string `json:"namespace"` Revision string `json:"revision"` Updated string `json:"updated"` Status string `json:"status"` ChartVersion string `json:"chart"` AppVersion string `json:"app_version"` }
func (HelmRelease) Chart ¶
func (h HelmRelease) Chart() string
func (HelmRelease) Details ¶
func (m HelmRelease) Details() string
func (HelmRelease) Label ¶
func (m HelmRelease) Label() string
func (HelmRelease) Match ¶
func (m HelmRelease) Match(input string) bool
func (HelmRelease) Selected ¶
func (m HelmRelease) Selected() string
func (HelmRelease) String ¶
func (h HelmRelease) String() string
func (HelmRelease) Version ¶
func (h HelmRelease) Version() string
type Manifest ¶
type Manifest struct { Name string `yaml:"name"` Repos []ManifestRepo `yaml:"repos"` // Helm repos AllowedEnv []SelectableString `yaml:"allowed_env"` // Allowed environment variables Releases []ManifestRelease `yaml:"releases"` // Helm releases Singles []ManifestSingle `yaml:"singles"` // Single files LocalCharts []SelectableString `yaml:"local_charts"` // Local charts Exists bool `yaml:"-"` // Whether the manifest exists }
func (Manifest) ReleaseByName ¶
func (m Manifest) ReleaseByName(name string) ManifestRelease
func (Manifest) ReleaseIdxByName ¶
func (m Manifest) ReleaseIdxByName(name string) (ManifestRelease, int)
func (Manifest) RepoByName ¶
func (m Manifest) RepoByName(name string) ManifestRepo
func (Manifest) SingleByName ¶
func (m Manifest) SingleByName(name string) ManifestSingle
type ManifestChart ¶
type ManifestChart struct { Name string `yaml:"name"` // Name of the chart Version string `yaml:"version"` // Version of the chart AppVersion string `yaml:"app_version"` // AppVersion the chart covers Repo string `yaml:"repo"` // Repo the chart is in from the manifest }
func (ManifestChart) Details ¶
func (m ManifestChart) Details() string
func (ManifestChart) Label ¶
func (m ManifestChart) Label() string
func (ManifestChart) Match ¶
func (m ManifestChart) Match(input string) bool
func (ManifestChart) RepoName ¶
func (m ManifestChart) RepoName() string
func (ManifestChart) Selected ¶
func (m ManifestChart) Selected() string
func (ManifestChart) String ¶
func (m ManifestChart) String() string
type ManifestRelease ¶
type ManifestRelease struct { Name string `yaml:"name"` // the release name (required) Namespace string `yaml:"namespace"` // the namespace the release is installed in (defaults to "default") Chart ManifestChart `yaml:"chart"` // The chart to install (required) }
func (ManifestRelease) Details ¶
func (m ManifestRelease) Details() string
func (ManifestRelease) Label ¶
func (m ManifestRelease) Label() string
func (ManifestRelease) Match ¶
func (m ManifestRelease) Match(input string) bool
func (ManifestRelease) Selected ¶
func (m ManifestRelease) Selected() string
func (ManifestRelease) String ¶
func (m ManifestRelease) String() string
type ManifestRepo ¶
type ManifestRepo struct { Name string `yaml:"name"` // Name of the repo URL string `yaml:"url"` // URL of the repo }
func (ManifestRepo) Details ¶
func (m ManifestRepo) Details() string
func (ManifestRepo) Label ¶
func (m ManifestRepo) Label() string
func (ManifestRepo) Match ¶
func (m ManifestRepo) Match(input string) bool
func (ManifestRepo) Selected ¶
func (m ManifestRepo) Selected() string
func (ManifestRepo) String ¶
func (m ManifestRepo) String() string
type ManifestSingle ¶
type ManifestSingle struct { Name string `yaml:"name"` // Name of the single UseCreate bool `yaml:"use_create"` // Use create instead of apply Namespace string `yaml:"namespace"` // Namespace to install the single in (optional) }
func (ManifestSingle) Details ¶
func (m ManifestSingle) Details() string
func (ManifestSingle) Label ¶
func (m ManifestSingle) Label() string
func (ManifestSingle) Match ¶
func (m ManifestSingle) Match(input string) bool
func (ManifestSingle) Selected ¶
func (m ManifestSingle) Selected() string
func (ManifestSingle) String ¶
func (m ManifestSingle) String() string
type ReleaseLock ¶
type Selectable ¶
type SelectableString ¶
type SelectableString string
func (SelectableString) Details ¶
func (s SelectableString) Details() string
func (SelectableString) Label ¶
func (s SelectableString) Label() string
func (SelectableString) Match ¶
func (s SelectableString) Match(input string) bool
func (SelectableString) Selected ¶
func (s SelectableString) Selected() string
func (SelectableString) String ¶
func (s SelectableString) String() string
type StringerFunc ¶
type StringerFunc func() string
func (StringerFunc) String ¶
func (s StringerFunc) String() string
type ToStringer ¶
type ToStringer string
func (ToStringer) String ¶
func (s ToStringer) String() string
type Validator ¶
func ConditionalValidator ¶
func ConditionalValidator[T comparable](validator func(input T) Validator[T]) Validator[T]
func EmptyValidator ¶
func EmptyValidator[T comparable](name string, empty bool) Validator[T]
func EnvValidator ¶
func EqualValidator ¶
func EqualValidator[T comparable](format Stringer, future Future[[]T]) Validator[T]
func MultiValidator ¶
func NotEqualValidator ¶
func NotEqualValidator[T comparable](template Stringer, future Future[[]T]) Validator[T]
func OptionalEmptyValidator ¶
func OptionalEmptyValidator[T comparable]() Validator[T]
func PathValidator ¶
type ValidatorFunction ¶
func (ValidatorFunction[T]) Convert ¶
func (v ValidatorFunction[T]) Convert(val string) (T, error)
func (ValidatorFunction[T]) Validate ¶
func (v ValidatorFunction[T]) Validate(val T) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.