config

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: BSD-3-Clause Imports: 15 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 APICall added in v0.0.32

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

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"`
	Help       string   `yaml:"help,omitempty"`
	Short      string   `yaml:"short,omitempty"`
	AliasTo    string   `yaml:"alias_to,omitempty"`
	Aliases    []string `yaml:"aliases,omitempty"`
	AliasHelp  string   `yaml:"alias_help,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 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, isJSON bool) (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"`
	API            map[string]APICall `yaml:"api,omitzero"`
	Entities       map[string]Entity  `yaml:"entities,omitzero"`
	Aliases        []Alias            `yaml:"aliases,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 {
	Title   string   `yaml:"title,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"`
}

func (Entity) IsZero added in v0.0.32

func (e Entity) IsZero() bool

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"`
	Kind          reflect.Kind `yaml:"kind,omitempty"`
	ContainerKind reflect.Kind `yaml:"container,omitempty"`
	CustomValue   string       `yaml:"customValue,omitempty"`
	Help          string       `yaml:"help,omitempty"`
	Default       string       `yaml:"default,omitempty"`
	AllowedValues []string     `yaml:"values,omitzero"`
	Hidden        bool         `yaml:"hidden,omitempty"`
}

type FlagSet added in v0.0.9

type FlagSet []Flag

func (*FlagSet) Add added in v0.0.32

func (fs *FlagSet) Add(f 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"`
}

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