commands

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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
	// Commit is the git commit from which this CLI binary was built.
	Commit string
	//BuiltBy is the release program that built this binary
	BuiltBy 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 NewCreateOAuthAppCommand

func NewCreateOAuthAppCommand() *cobra.Command

NewCreateOAuthAppCommand instantiates the new instance of the StartCommand

func NewRootCommand

func NewRootCommand() *cobra.Command

func NewVersionCommand

func NewVersionCommand() *cobra.Command

NewVersionCommand implements 'kluster version' commands

func NewWorkshopSetupCommand

func NewWorkshopSetupCommand() *cobra.Command

NewWorkshopSetupCommand instantiates the new instance of the NewWorkshopSetupCommand

Types

type Command

type Command interface {

	//AddFlags adds the flags to the commands
	AddFlags(cmd *cobra.Command)

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

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

type GiteaUser

type GiteaUser struct {
	From                int      `yaml:"from"`
	To                  int      `yaml:"to"`
	AddKubernetesSecret bool     `yaml:"addKubernetesSecret"`
	Namespace           string   `yaml:"namespace"`
	OAuthAppName        string   `yaml:"oAuthAppName"`
	OAuthRedirectURI    string   `yaml:"oAuthRedirectURI"`
	SecretNamespace     string   `yaml:"secretNamespace"`
	Repos               []string `yaml:"repos"`
}

GiteaUser is a Gitea user

type OAuthAppOptions

type OAuthAppOptions struct {
	// contains filtered or unexported fields
}

OAuthAppOptions to hold the options to create oauth application

func (*OAuthAppOptions) AddFlags

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

AddFlags implements Command

func (*OAuthAppOptions) Execute

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

Execute implements Command

func (*OAuthAppOptions) Validate

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

Validate implements Command

type WorkshopOptions

type WorkshopOptions struct {
	GiteaAdminPassword string    `yaml:"giteaAdminUserPassword,omitempty"`
	GiteaAdminUser     string    `yaml:"giteaAdminUserName,omitempty"`
	GiteaURL           string    `yaml:"giteaURL,omitempty"`
	GiteaUsers         GiteaUser `yaml:"users"`
}

WorkshopOptions the configuration data for workshop

type WorkshopSetupOptions

type WorkshopSetupOptions struct {
	// contains filtered or unexported fields
}

WorkshopSetupOptions the configuration data for workshop

func (*WorkshopSetupOptions) AddFlags

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

AddFlags implements Command

func (*WorkshopSetupOptions) Execute

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

Execute implements Command

func (*WorkshopSetupOptions) Validate

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

Validate implements Command

Jump to

Keyboard shortcuts

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