meta

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetaFlags

type MetaFlags struct {
	Workspace *string

	Backend *string

	WorkDir *string
}

MetaFlags directly reflect the information that CLI is gathering via flags. They will be converted to MetaOptions, which reflect the runtime requirements for the command.

This structure reduces the transformation to wiring and makes the logic itself easy to unit test.

func NewMetaFlags

func NewMetaFlags() *MetaFlags

NewMetaFlags provides default flags and values for use in other commands.

func (*MetaFlags) AddFlags

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

AddFlags registers flags for a cli.

func (*MetaFlags) ToOptions

func (f *MetaFlags) ToOptions() (*MetaOptions, error)

ToOptions converts MetaFlags to MetaOptions.

type MetaOptions

type MetaOptions struct {
	// RefProject references the project for this CLI invocation.
	RefProject *v1.Project

	// RefStack referenced the stack for this CLI invocation.
	RefStack *v1.Stack

	// RefWorkspace referenced the workspace for this CLI invocation.
	RefWorkspace *v1.Workspace

	// StorageBackend referenced the target storage backend for this CLI invocation.
	StorageBackend backend.Backend
}

MetaOptions are the meta-options that are available on all or most commands.

Jump to

Keyboard shortcuts

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