subcommand

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DemoYamlFile   = "https://raw.githubusercontent.com/OpenFunction/OpenFunction/main/config/samples/function-sample-serving-only.yaml"
	DemoYamlFileCN = "https://cdn.jsdelivr.net/gh/OpenFunction/OpenFunction@main/config/samples/function-sample-serving-only.yaml"
)

Variables

This section is empty.

Functions

func AddBuild

func AddBuild(cmd *cobra.Command, builder *fn.BuildImpl)

func AddFilenameOptionFlags

func AddFilenameOptionFlags(cmd *cobra.Command, options *resource.FilenameOptions, usage string)

func AddGitRepo

func AddGitRepo(cmd *cobra.Command, gitRepo *fn.GitRepo)

func AddJsonFilenameFlag

func AddJsonFilenameFlag(flags *pflag.FlagSet, value *[]string, usage string)

func AddKustomizeFlag

func AddKustomizeFlag(flags *pflag.FlagSet, value *string)

AddKustomizeFlag adds kustomize flag to a command

func AddServing

func AddServing(cmd *cobra.Command, serving *fn.ServingImpl)

func NewCmdLogs added in v0.6.0

NewCmdLogs builds the `logs` sub command

func NewCmdVersion added in v0.5.3

func NewCmdVersion() *cobra.Command

NewCmdVersion creates a new version command

func NewListPrintFlags

func NewListPrintFlags(printer func(h PrintHandler)) (*genericclioptions.PrintFlags, func(h PrintHandler))

NewListFlags returns flags associated with humanreadable, template, and "name" printing, with default values set.

Types

type Create

type Create struct {
	genericclioptions.IOStreams
	Printer *util.Printer

	FilenameOptions resource.FilenameOptions
	DryRun          bool

	Name             string
	Image            string
	Version          string
	Port             int32
	ImageCredentials string
	Build            *openfunction.BuildImpl
	Serving          *openfunction.ServingImpl
	// contains filtered or unexported fields
}

Create is the commandline for 'create' sub command

func NewCreate

func NewCreate(ioStreams genericclioptions.IOStreams) *Create

NewCreate returns an initialized Create instance

func (*Create) Complete

func (c *Create) Complete(cmd *cobra.Command, args []string) error

func (*Create) RunCreate

func (c *Create) RunCreate(fc client.Interface, cmd *cobra.Command, args []string) error

func (*Create) Validate

func (c *Create) Validate(cmd *cobra.Command) error

type Delete

type Delete struct {
	genericclioptions.IOStreams

	FilenameOptions resource.FilenameOptions

	NamespaceIfScoped bool
	// contains filtered or unexported fields
}

Delete is the commandline for 'delete' sub command

func NewDelete

func NewDelete(ioStreams genericclioptions.IOStreams) *Delete

NewDelete returns an initialized Delete instance

func (*Delete) Complete

func (d *Delete) Complete(fc client.Interface, cmd *cobra.Command, args []string) (err error)

func (*Delete) Run

func (d *Delete) Run(fc client.Interface, cmd *cobra.Command) (err error)

func (*Delete) ToOptions

func (d *Delete) ToOptions() metav1.DeleteOptions

func (*Delete) Validate

func (d *Delete) Validate(cmd *cobra.Command, args []string) error

type Demo

type Demo struct {
	genericclioptions.IOStreams

	Verbose             bool
	RegionCN            bool
	OpenFunctionVersion string
	DryRun              bool
	AutoPrune           bool
	Timeout             time.Duration
}

Demo is the commandline for 'demo' sub command

func NewDemo

func NewDemo(ioStreams genericclioptions.IOStreams) *Demo

NewDemo returns an initialized Init instance

func (*Demo) RunKind

func (i *Demo) RunKind(cf *genericclioptions.ConfigFlags, cmd *cobra.Command) error

func (*Demo) ValidateArgs added in v0.5.2

func (i *Demo) ValidateArgs(cmd *cobra.Command, args []string) error

type Get

type Get struct {
	genericclioptions.IOStreams

	Printer *util.Printer

	Name              string
	NamespaceIfScoped bool
	// contains filtered or unexported fields
}

Get is the commandline for 'get' sub command

func NewGet

func NewGet(ioStreams genericclioptions.IOStreams) *Get

NewGet returns an initialized Get instance

func (*Get) Complete

func (g *Get) Complete(cmd *cobra.Command, args []string) error

func (*Get) Run

func (g *Get) Run(fc client.Interface, cmd *cobra.Command, args []string) error

func (*Get) ToOptions

func (l *Get) ToOptions() metav1.ListOptions

type Install

type Install struct {
	genericclioptions.IOStreams

	Verbose             bool
	Runtimes            []string
	Ingress             string
	WithoutCI           bool
	WithDapr            bool
	WithKeda            bool
	WithKnative         bool
	WithShipWright      bool
	WithCertManager     bool
	WithIngressNginx    bool
	WithAll             bool
	RegionCN            bool
	OpenFunctionVersion string
	DryRun              bool
	Upgrade             bool
	Yes                 bool
	Timeout             time.Duration
	// contains filtered or unexported fields
}

Install is the commandline for 'install' sub command

func NewInstall

func NewInstall(ioStreams genericclioptions.IOStreams) *Install

NewInstall returns an initialized Init instance

func (*Install) RunInstall

func (i *Install) RunInstall(cl *k8s.Clientset, cmd *cobra.Command) error

func (*Install) ValidateArgs

func (i *Install) ValidateArgs() error

type Logs added in v0.6.0

type Logs struct {
	*genericclioptions.IOStreams

	Follow bool
	// contains filtered or unexported fields
}

Logs is the commandline for `logs` sub command

type PrintHandler

type PrintHandler interface {
	TableHandler(columns []metav1beta1.TableColumnDefinition, printFunc interface{}) error
}

type Uninstall

type Uninstall struct {
	genericclioptions.IOStreams

	Verbose             bool
	Runtimes            []string
	WithCI              bool
	WithDapr            bool
	WithKeda            bool
	WithKnative         bool
	WithShipWright      bool
	WithCertManager     bool
	WithIngressNginx    bool
	WithAll             bool
	RegionCN            bool
	OpenFunctionVersion string
	DryRun              bool
	Yes                 bool
	WaitForCleared      bool
	Timeout             time.Duration
}

Uninstall is the commandline for 'uninstall' sub command

func NewUninstall

func NewUninstall(ioStreams genericclioptions.IOStreams) *Uninstall

NewUninstall returns an initialized Init instance

func (*Uninstall) RunUninstall

func (i *Uninstall) RunUninstall(cl *k8s.Clientset, cmd *cobra.Command) error

func (*Uninstall) ValidateArgs

func (i *Uninstall) ValidateArgs() error

type VersionOptions added in v0.5.3

type VersionOptions struct {
	ShortVersion                bool
	ShowSupportedK8sVersionList bool
}

func NewVersionOptions added in v0.5.3

func NewVersionOptions() *VersionOptions

func (*VersionOptions) AddFlags added in v0.5.3

func (o *VersionOptions) AddFlags(cmd *cobra.Command)

Jump to

Keyboard shortcuts

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