config

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: BSD-3-Clause Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

SPDX-FileCopyrightText: 2026 Outscale SAS <opensource@outscale.com>

SPDX-License-Identifier: BSD-3-Clause

SPDX-FileCopyrightText: 2026 Outscale SAS <opensource@outscale.com>

SPDX-License-Identifier: BSD-3-Clause

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action added in v0.0.7

type Action string
const (
	ActionDelete Action = "delete"
)

type Alias

type Alias struct {
	Entity     string   `yaml:"entity"`
	SubCommand string   `yaml:"sub_command,omitempty"`
	Use        string   `yaml:"use"`
	AliasTo    string   `yaml:"alias_to,omitempty"`
	Aliases    []string `yaml:"aliases,omitempty"`
	Short      string   `yaml:"short,omitempty"`
	Command    []string `yaml:"command"`
	Flags      FlagSet  `yaml:"flags,omitempty"`
	Prompt     *Prompt  `yaml:"prompt,omitempty"`
}

func (*Alias) HasRequiredFlag added in v0.0.22

func (a *Alias) HasRequiredFlag() bool

type Call

type Call struct {
	Content string  `yaml:"content,omitempty"`
	Entity  string  `yaml:"entity,omitempty"`
	Group   string  `yaml:"group,omitempty"`
	AliasTo string  `yaml:"alias_to,omitempty"`
	Short   string  `yaml:"short,omitempty"`
	Flags   FlagSet `yaml:"flags,omitempty"`
}

type Column

type Column struct {
	Title   string `yaml:"title"`
	Content string `yaml:"content"`
	Primary bool   `yaml:"primary,omitempty"`
	// contains filtered or unexported fields
}

func (*Column) Get

func (c *Column) Get(v any) (any, error)

func (Column) String

func (c Column) String() string

type Columns

type Columns []Column

func ParseColumns

func ParseColumns(s string) Columns

type Config

type Config struct {
	DefaultContent string            `yaml:"default_content,omitempty"`
	Calls          map[string]Call   `yaml:"contents,omitempty"`
	Entities       map[string]Entity `yaml:"entities,omitempty"`
	Aliases        []Alias           `yaml:"aliases,omitempty"`
	Spec           Spec              `yaml:"spec,omitzero"`
}

func For

func For(provider string) Config

type Configs

type Configs map[string]Config

func Defaults

func Defaults() Configs

type Entity

type Entity struct {
	Skip      bool     `yaml:"skip,omitempty"`
	NoAliases bool     `yaml:"no_aliases,omitempty"`
	Explode   bool     `yaml:"explode,omitempty"`
	Sort      bool     `yaml:"sort,omitempty"`
	Aliases   []string `yaml:"aliases,omitempty"`
	Columns   Columns  `yaml:"columns,omitempty"`
	Primary   string   `yaml:"primary,omitempty"`
}

type Flag added in v0.0.9

type Flag struct {
	Name     string `yaml:"name"`
	AliasTo  string `yaml:"alias_to,omitempty"`
	Required bool   `yaml:"required,omitempty"`
	Type     string `yaml:"type,omitempty"`
	Usage    string `yaml:"usage,omitempty"`
	Default  string `yaml:"default,omitempty"`
}

type FlagConfig

type FlagConfig struct {
	AppliesTo  string `yaml:"applies_to"`
	TrimPrefix string `yaml:"trim_prefix"`
}

type FlagSet added in v0.0.9

type FlagSet []Flag

func (FlagSet) Get added in v0.0.9

func (fs FlagSet) Get(name string) (Flag, bool)

func (FlagSet) Names added in v0.0.9

func (fs FlagSet) Names() []string

type Prompt added in v0.0.7

type Prompt struct {
	Action         Action   `yaml:"action"`
	DisplayCommand []string `yaml:"display,omitempty"`
	Flags          FlagSet  `yaml:"flags,omitempty"`
}

type Spec added in v0.0.14

type Spec struct {
	Calls      map[string]SpecCall      `yaml:"calls,omitempty"`
	Attributes map[string]SpecAttribute `yaml:"attributes,omitempty"`
}

func (Spec) ForAttribute added in v0.0.14

func (s Spec) ForAttribute(call, name string) SpecAttribute

func (Spec) ForCall added in v0.0.14

func (s Spec) ForCall(name string) SpecCall

func (*Spec) SetAttribute added in v0.0.14

func (s *Spec) SetAttribute(call, name string, spec SpecAttribute)

type SpecAttribute added in v0.0.14

type SpecAttribute struct {
	Help     string `yaml:"help,omitempty"`
	Required bool   `yaml:"required,omitempty"`
}

type SpecCall added in v0.0.14

type SpecCall struct {
	Help string `yaml:"help,omitempty"`
}

Directories

Path Synopsis
generate
archive command
iaas command
SPDX-FileCopyrightText: 2026 Outscale SAS <opensource@outscale.com>
SPDX-FileCopyrightText: 2026 Outscale SAS <opensource@outscale.com>
kube command
SPDX-FileCopyrightText: 2026 Outscale SAS <opensource@outscale.com>
SPDX-FileCopyrightText: 2026 Outscale SAS <opensource@outscale.com>
kubeclient command
SPDX-FileCopyrightText: 2026 Outscale SAS <opensource@outscale.com>
SPDX-FileCopyrightText: 2026 Outscale SAS <opensource@outscale.com>
list_alias command
storage command

Jump to

Keyboard shortcuts

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