command

package
v0.19.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CoreReleaseURI holds the URI for the release yaml to install.
	// This will generally hold a path to config/core, which is infused
	// via linker flags at build time.  For development, this will
	// typically hold a local file path, but for releases will point to
	// a URL.  See ./hack/build-flags.sh for the linker magic.
	CoreReleaseURI = ""

	// InMemoryReleaseURI is the analog of CoreReleaseURI for config/in-memory.
	InMemoryReleaseURI = ""
)
View Source
var (
	// Version is the version string at which the CLI is built.
	Version string
	// BuildDate is the date on which this CLI binary was built
	BuildDate string
	// GitRevision is the git commit from which this CLI binary was built.
	GitRevision string
)

These are populated at link time, see ./hack/build-flags.sh

Functions

func BinaryName

func BinaryName() string

BinaryName of how we are being used.

func ExamplePrefix

func ExamplePrefix() string

ExamplePrefix is the prefix to use in our examples.

func Kubeconfig

func Kubeconfig() string

Kubeconfig establishes the appropriate kubernetes configuration file to use.

func Namespace

func Namespace() string

Namespace establishes the appropriate default namespace.

func NewApplyCommand added in v0.19.0

func NewApplyCommand() *cobra.Command

NewApplyCommand implements 'kn-im apply' command

func NewBuildCommand

func NewBuildCommand() *cobra.Command

NewBuildCommand implements 'kn-im build' command

func NewBuildpackCommand

func NewBuildpackCommand() *cobra.Command

NewBuildpackCommand implements 'kn-im build' command

func NewBundleCommand

func NewBundleCommand() *cobra.Command

NewBundleCommand implements 'kn-im bundle' command

func NewInstallCommand added in v0.19.0

func NewInstallCommand() *cobra.Command

NewInstallCommand implements 'kn-im install' command

func NewResolveCommand added in v0.19.0

func NewResolveCommand() *cobra.Command

NewResolveCommand implements 'kn-im resolve' command

func NewVersionCommand

func NewVersionCommand() *cobra.Command

NewVersionCommand implements 'kn-im version' command

Types

type ApplyOptions added in v0.19.0

type ApplyOptions struct {
	// Inherit all of the base build options.
	ResolveOptions
}

ApplyOptions implements Interface for the `kn im apply` command.

func (*ApplyOptions) Execute added in v0.19.0

func (opts *ApplyOptions) Execute(cmd *cobra.Command, args []string) error

Execute implements Interface

type BaseBuildOptions added in v0.19.0

type BaseBuildOptions struct {
	// Inherit all of the bundle options.
	BundleOptions

	// ImageName is the string name of the bundle image to which we should publish things.
	ImageName string

	// ServiceAccount is the name of the service account *as* which to run the build.
	ServiceAccount string
	// contains filtered or unexported fields
}

BaseBuildOptions implements Interface for the `kn im build` command.

func (*BaseBuildOptions) AddFlags added in v0.19.0

func (opts *BaseBuildOptions) AddFlags(cmd *cobra.Command)

AddFlags implements Interface

func (*BaseBuildOptions) Validate added in v0.19.0

func (opts *BaseBuildOptions) Validate(cmd *cobra.Command, args []string) error

Validate implements Interface

type BuildOptions added in v0.19.0

type BuildOptions struct {
	// Inherit all of the base build options.
	BaseBuildOptions
	// contains filtered or unexported fields
}

BuildOptions implements Interface for the `kn im build` command.

func (*BuildOptions) AddFlags added in v0.19.0

func (opts *BuildOptions) AddFlags(cmd *cobra.Command)

AddFlags implements Interface

func (*BuildOptions) Execute added in v0.19.0

func (opts *BuildOptions) Execute(cmd *cobra.Command, args []string) error

Execute implements Interface

func (*BuildOptions) Validate added in v0.19.0

func (opts *BuildOptions) Validate(cmd *cobra.Command, args []string) error

Validate implements Interface

type BuildpackOptions added in v0.19.0

type BuildpackOptions struct {
	// Inherit all of the base build options.
	BaseBuildOptions
	// contains filtered or unexported fields
}

BuildpackOptions implements Interface for the `kn im build` command.

func (*BuildpackOptions) AddFlags added in v0.19.0

func (opts *BuildpackOptions) AddFlags(cmd *cobra.Command)

AddFlags implements Interface

func (*BuildpackOptions) Execute added in v0.19.0

func (opts *BuildpackOptions) Execute(cmd *cobra.Command, args []string) error

Execute implements Interface

func (*BuildpackOptions) Validate added in v0.19.0

func (opts *BuildpackOptions) Validate(cmd *cobra.Command, args []string) error

Validate implements Interface

type BundleOptions added in v0.19.0

type BundleOptions struct {
	// ImageName is the string name of the bundle image to which we should publish things.
	ImageName string

	// Director is the string containing the directory to bundle.
	Directory string
	// contains filtered or unexported fields
}

BundleOptions implements Interface for the `kn im bundle` command.

func (*BundleOptions) AddFlags added in v0.19.0

func (opts *BundleOptions) AddFlags(cmd *cobra.Command)

AddFlags implements Interface

func (*BundleOptions) Execute added in v0.19.0

func (opts *BundleOptions) Execute(cmd *cobra.Command, args []string) error

Execute implements Interface

func (*BundleOptions) Validate added in v0.19.0

func (opts *BundleOptions) Validate(cmd *cobra.Command, args []string) error

Validate implements Interface

type Interface added in v0.19.0

type Interface interface {
	// AddFlags populates the flags needed by this command.
	AddFlags(cmd *cobra.Command)

	// Validate checks the command line arguments and configuration
	// prior to executing the command.
	Validate(cmd *cobra.Command, args []string) error

	// Execute runs the command.
	Execute(cmd *cobra.Command, args []string) error
}

Interface defines the interface that various options types are expected to adhere to.

type ResolveOptions added in v0.19.0

type ResolveOptions struct {
	// Inherit all of the base build options.
	BaseBuildOptions

	Filenames []string
	Recursive bool

	Parallelism int
	// contains filtered or unexported fields
}

ResolveOptions implements Interface for the `kn im resolve` command.

func (*ResolveOptions) AddFlags added in v0.19.0

func (opts *ResolveOptions) AddFlags(cmd *cobra.Command)

AddFlags implements Interface

func (*ResolveOptions) EnumerateFiles added in v0.19.0

func (opts *ResolveOptions) EnumerateFiles() (files []string)

EnumerateFiles is based heavily on pkg/kubectl

func (*ResolveOptions) Execute added in v0.19.0

func (opts *ResolveOptions) Execute(cmd *cobra.Command, args []string) error

Execute implements Interface

func (*ResolveOptions) ResolveFile added in v0.19.0

func (opts *ResolveOptions) ResolveFile(ctx context.Context, f string) (blocks []*yaml.Node, err error)

ResolveFile is based heavily on ko's resolveFile

func (*ResolveOptions) ResolveReferences added in v0.19.0

func (opts *ResolveOptions) ResolveReferences(ctx context.Context, docs []*yaml.Node, kontext name.Digest) error

ResolveReferences is based heavily on ko's ImageReferences

func (*ResolveOptions) Validate added in v0.19.0

func (opts *ResolveOptions) Validate(cmd *cobra.Command, args []string) error

Validate implements Interface

Jump to

Keyboard shortcuts

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