Documentation ¶
Index ¶
- Variables
- func BinaryName() string
- func ExamplePrefix() string
- func Kubeconfig() string
- func Namespace() string
- func NewApplyCommand() *cobra.Command
- func NewBuildCommand() *cobra.Command
- func NewBuildpackCommand() *cobra.Command
- func NewBundleCommand() *cobra.Command
- func NewInstallCommand() *cobra.Command
- func NewResolveCommand() *cobra.Command
- func NewVersionCommand() *cobra.Command
- type ApplyOptions
- type BaseBuildOptions
- type BuildOptions
- type BuildpackOptions
- type BundleOptions
- type Interface
- type ResolveOptions
- func (opts *ResolveOptions) AddFlags(cmd *cobra.Command)
- func (opts *ResolveOptions) EnumerateFiles() (files []string)
- func (opts *ResolveOptions) Execute(cmd *cobra.Command, args []string) error
- func (opts *ResolveOptions) ResolveFile(ctx context.Context, f string) (blocks []*yaml.Node, err error)
- func (opts *ResolveOptions) ResolveReferences(ctx context.Context, docs []*yaml.Node, kontext name.Digest) error
- func (opts *ResolveOptions) Validate(cmd *cobra.Command, args []string) error
Constants ¶
This section is empty.
Variables ¶
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 = "" )
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 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 NewApplyCommand ¶ added in v0.19.0
NewApplyCommand implements 'kn-im apply' command
func NewBuildCommand ¶
NewBuildCommand implements 'kn-im build' command
func NewBuildpackCommand ¶
NewBuildpackCommand implements 'kn-im build' command
func NewBundleCommand ¶
NewBundleCommand implements 'kn-im bundle' command
func NewInstallCommand ¶ added in v0.19.0
NewInstallCommand implements 'kn-im install' command
func NewResolveCommand ¶ added in v0.19.0
NewResolveCommand implements 'kn-im resolve' command
func NewVersionCommand ¶
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.
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
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
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
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
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