subcommand

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const DemoYamlFile = "https://raw.githubusercontent.com/OpenFunction/OpenFunction/main/config/samples/function-sample-serving-only.yaml"
View Source
const 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 NewCmdApply

func NewCmdApply(restClient util.Getter, ioStreams genericclioptions.IOStreams) *cobra.Command

func NewCmdCreate

func NewCmdCreate(restClient util.Getter, ioStreams genericclioptions.IOStreams) *cobra.Command

func NewCmdDelete

func NewCmdDelete(restClient util.Getter, ioStreams genericclioptions.IOStreams) *cobra.Command

func NewCmdDemo

func NewCmdDemo(restClient util.Getter, ioStreams genericclioptions.IOStreams) *cobra.Command

func NewCmdGet

func NewCmdGet(restClient util.Getter, ioStreams genericclioptions.IOStreams) *cobra.Command

func NewCmdInit

func NewCmdInit(ioStreams genericclioptions.IOStreams) *cobra.Command

func NewCmdInstall

func NewCmdInstall(restClient util.Getter, ioStreams genericclioptions.IOStreams) *cobra.Command

func NewCmdUninstall

func NewCmdUninstall(restClient util.Getter, ioStreams genericclioptions.IOStreams) *cobra.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 Apply

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

	FilenameOptions resource.FilenameOptions
	DryRun          bool
	FieldManager    string
	// contains filtered or unexported fields
}

Apply is the commandline for 'apply' sub command

func NewApply

func NewApply(ioStreams genericclioptions.IOStreams) *Apply

NewApply returns an initialized Apply instance

func (*Apply) Complete

func (a *Apply) Complete(cmd *cobra.Command, args []string) error

func (*Apply) RunApply

func (a *Apply) RunApply(fc client.FnClient, cmd *cobra.Command) error

func (*Apply) Validate

func (a *Apply) Validate(cmd *cobra.Command, args []string) error

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.FnClient, 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.FnClient, cmd *cobra.Command, args []string) (err error)

func (*Delete) Run

func (d *Delete) Run(fc client.FnClient, 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 'init' sub command

func NewDemo

func NewDemo(ioStreams genericclioptions.IOStreams) *Demo

NewDemo returns an initialized Init instance

func (*Demo) DeleteKind

func (i *Demo) DeleteKind() error

func (*Demo) InstallDapr

func (i *Demo) InstallDapr(ctx context.Context, operator *common.Operator) error

func (*Demo) InstallKind

func (i *Demo) InstallKind(ctx context.Context, operator *common.Operator) error

func (*Demo) RunKind

func (i *Demo) RunKind(cl *k8s.Clientset, cmd *cobra.Command) error

func (*Demo) RunOpenFunctionDemo

func (i *Demo) RunOpenFunctionDemo(ctx context.Context, cl *k8s.Clientset, operator *common.Operator) 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.FnClient, cmd *cobra.Command, args []string) error

func (*Get) ToOptions

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

type Init

type Init struct {
	genericclioptions.IOStreams

	Language    string
	Path        string
	ProjectName string
	Repo        string
	OutPutPath  string
	// contains filtered or unexported fields
}

Init is the commandline for 'init' sub command

func NewInit

func NewInit(ioStreams genericclioptions.IOStreams) *Init

NewInit returns an initialized Init instance

func (*Init) RunInit

func (i *Init) RunInit(cmd *cobra.Command) error

func (*Init) ValidateArgs

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

type Install

type Install struct {
	genericclioptions.IOStreams

	Verbose             bool
	WithDapr            bool
	WithKeda            bool
	WithKnative         bool
	WithShipWright      bool
	WithCertManager     bool
	WithIngress         bool
	WithAsyncRuntime    bool
	WithSyncRuntime     bool
	WithAll             bool
	RegionCN            bool
	OpenFunctionVersion string
	DryRun              bool
	WithUpgrade         bool
	Timeout             time.Duration
	// contains filtered or unexported fields
}

Install is the commandline for 'init' 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(cmd *cobra.Command, args []string) error

type PrintHandler

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

type Uninstall

type Uninstall struct {
	genericclioptions.IOStreams

	Verbose             bool
	WithDapr            bool
	WithKeda            bool
	WithKnative         bool
	WithShipWright      bool
	WithCertManager     bool
	WithIngress         bool
	WithAsyncRuntime    bool
	WithSyncRuntime     bool
	WithAll             bool
	RegionCN            bool
	OpenFunctionVersion string
	DryRun              bool
	WaitForCleared      bool
	Timeout             time.Duration
}

Uninstall is the commandline for 'init' 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(cmd *cobra.Command, args []string) error

Jump to

Keyboard shortcuts

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