resource

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdGraph

func NewCmdGraph(streams genericiooptions.IOStreams) *cobra.Command

NewCmdGraph creates the `kusion resource graph` command.

func NewCmdRes

func NewCmdRes(streams genericiooptions.IOStreams) *cobra.Command

NewCmdRes returns an initialized Command instance for 'resource' sub command.

func NewCmdShow added in v0.14.0

func NewCmdShow(streams genericiooptions.IOStreams) *cobra.Command

NewCmdShow creates the `kusion resource show` command.

Types

type GraphFlags

type GraphFlags struct {
	Project   *string
	Workspace *[]string
	Backend   *string
	All       bool
	Output    string
}

GraphFlags reflects the information that CLI is gathering via flags, which will be converted into GraphOptions.

func NewGraphFlags

func NewGraphFlags() *GraphFlags

NewGraphFlags returns a default GraphFlags.

func (*GraphFlags) AddFlags

func (f *GraphFlags) AddFlags(cmd *cobra.Command)

AddFlags registers flags for the CLI.

func (*GraphFlags) ToOptions

func (f *GraphFlags) ToOptions() (*GraphOptions, error)

ToOptions converts from CLI inputs to runtime inputs.

type GraphOptions

type GraphOptions struct {
	Project      string
	Workspace    []string
	GraphStorage map[string]graph.Storage
	Output       string
}

GraphOptions defines the configuration parameters for the `kusion release graph` command.

func (*GraphOptions) Run

func (o *GraphOptions) Run() error

Run executes the `kusion resource graph` command.

func (*GraphOptions) Validate

func (o *GraphOptions) Validate(cmd *cobra.Command, args []string) error

Validate verifies if GraphOptions are valid and without conflicts.

type ShowFlags added in v0.14.0

type ShowFlags struct {
	ID        *string
	Project   *string
	Workspace *string
	Backend   *string
	Output    string
}

ShowFlags reflects the information that CLI is gathering via flags, which will be converted into ShowOptions.

func NewShowFlags added in v0.14.0

func NewShowFlags(_ genericiooptions.IOStreams) *ShowFlags

NewShowFlags returns a default ShowFlags.

func (*ShowFlags) AddFlags added in v0.14.0

func (f *ShowFlags) AddFlags(cmd *cobra.Command)

AddFlags adds flags for a ShowOptions struct to the specified command.

func (*ShowFlags) ToOptions added in v0.14.0

func (f *ShowFlags) ToOptions() (*ShowOptions, error)

ToOptions converts ShowFlags to ShowOptions.

type ShowOptions added in v0.14.0

type ShowOptions struct {
	ID             *string
	Project        *string
	Workspace      *string
	ReleaseStorage release.Storage
	Output         string
}

ShowOptions defines the configuration parameters for the `kusion resource show` command.

func (*ShowOptions) Run added in v0.14.0

func (o *ShowOptions) Run() (err error)

Run executes the `kusion resource show` command.

func (*ShowOptions) Validate added in v0.14.0

func (o *ShowOptions) Validate(cmd *cobra.Command, args []string) error

Validate checks the provided options for the `kusion resource show` command.

Jump to

Keyboard shortcuts

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