cmd

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBetaCmd added in v0.10.0

func AddBetaCmd(rootCmd *cobra.Command, opts *GlobalOptions)

func AddDownloadCmd

func AddDownloadCmd(rootCmd *cobra.Command, opts GlobalOptions)

func AddDownloadPackageCmd

func AddDownloadPackageCmd(download *cobra.Command, opts GlobalOptions)

func AddExtendBaseimageCmd added in v0.10.0

func AddExtendBaseimageCmd(extend *cobra.Command, opts *GlobalOptions)

func AddExtendCmd added in v0.10.0

func AddExtendCmd(rootCmd *cobra.Command, opts *GlobalOptions)

func AddInstallCephCmd

func AddInstallCephCmd(install *cobra.Command)

func AddInstallCmd

func AddInstallCmd(rootCmd *cobra.Command)

func AddInstallCodesphereCmd

func AddInstallCodesphereCmd(install *cobra.Command)

func AddListAPIKeysCmd added in v0.11.0

func AddListAPIKeysCmd(list *cobra.Command, opts GlobalOptions)

func AddListCmd

func AddListCmd(rootCmd *cobra.Command, opts GlobalOptions)

func AddListPackagesCmd

func AddListPackagesCmd(list *cobra.Command, opts GlobalOptions)

func AddRegisterCmd

func AddRegisterCmd(list *cobra.Command, opts GlobalOptions)

func AddRevokeAPIKeyCmd added in v0.9.0

func AddRevokeAPIKeyCmd(list *cobra.Command, opts GlobalOptions)

func AddRevokeCmd

func AddRevokeCmd(rootCmd *cobra.Command, opts GlobalOptions)

func AddUpdateCmd

func AddUpdateCmd(rootCmd *cobra.Command)

func AddUpgradeCephCmd

func AddUpgradeCephCmd(upgrade *cobra.Command)

func AddUpgradeCmd

func AddUpgradeCmd(rootCmd *cobra.Command)

func AddUpgradeCodesphereCmd

func AddUpgradeCodesphereCmd(upgrade *cobra.Command)

func AddVersionCmd

func AddVersionCmd(rootCmd *cobra.Command)

func Execute

func Execute()

Execute executes the root command. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetRootCmd

func GetRootCmd() *cobra.Command

GetRootCmd adds all child commands to the root command and sets flags appropriately.

Types

type BetaCmd added in v0.10.0

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

type DownloadCmd

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

DownloadCmd represents the download command

type DownloadPackageCmd

type DownloadPackageCmd struct {
	Opts       DownloadPackageOpts
	FileWriter util.FileIO
	// contains filtered or unexported fields
}

DownloadPackageCmd represents the package command

func (*DownloadPackageCmd) DownloadBuild

func (c *DownloadPackageCmd) DownloadBuild(p portal.Portal, build portal.Build, filename string) error

func (*DownloadPackageCmd) RunE

func (c *DownloadPackageCmd) RunE(_ *cobra.Command, args []string) error

type DownloadPackageOpts

type DownloadPackageOpts struct {
	GlobalOptions
	Version  string
	Hash     string
	Filename string
}

type ExtendBaseimageCmd added in v0.10.0

type ExtendBaseimageCmd struct {
	Opts *ExtendBaseimageOpts
	Env  env.Env
	// contains filtered or unexported fields
}

ExtendBaseimageCmd represents the baseimage command

func (*ExtendBaseimageCmd) ExtendBaseimage added in v0.10.0

func (c *ExtendBaseimageCmd) ExtendBaseimage(p *installer.Package, args []string) error

func (*ExtendBaseimageCmd) RunE added in v0.10.0

func (c *ExtendBaseimageCmd) RunE(_ *cobra.Command, args []string) error

type ExtendBaseimageOpts added in v0.10.0

type ExtendBaseimageOpts struct {
	*GlobalOptions
	Package    string
	Dockerfile string
	Force      bool
}

type ExtendCmd added in v0.10.0

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

ExtendCmd represents the extend command

type GlobalOptions

type GlobalOptions struct {
	OmsPortalApiKey string
}

type InstallCephCmd

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

InstallCephCmd represents the ceph command

type InstallCmd

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

InstallCmd represents the install command

type InstallCodesphereCmd

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

InstallCodesphereCmd represents the codesphere command

type ListAPIKeysCmd added in v0.11.0

type ListAPIKeysCmd struct {
	TableWriter util.TableWriter
	// contains filtered or unexported fields
}

func (*ListAPIKeysCmd) PrintKeysTable added in v0.11.0

func (c *ListAPIKeysCmd) PrintKeysTable(keys []portal.ApiKey)

func (*ListAPIKeysCmd) RunE added in v0.11.0

func (c *ListAPIKeysCmd) RunE(_ *cobra.Command, args []string) error

type ListBuildsCmd

type ListBuildsCmd struct {
	Opts        ListBuildsOpts
	TableWriter util.TableWriter
	// contains filtered or unexported fields
}

func (*ListBuildsCmd) PrintPackagesTable

func (c *ListBuildsCmd) PrintPackagesTable(packages portal.Builds)

func (*ListBuildsCmd) RunE

func (c *ListBuildsCmd) RunE(_ *cobra.Command, args []string) error

type ListBuildsOpts

type ListBuildsOpts struct {
	GlobalOptions
	Internal bool
}

type ListCmd

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

type MockUpdater

type MockUpdater struct {
	mock.Mock
}

MockUpdater is an autogenerated mock type for the Updater type

func NewMockUpdater

func NewMockUpdater(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockUpdater

NewMockUpdater creates a new instance of MockUpdater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockUpdater) Apply

func (_mock *MockUpdater) Apply(update io.Reader) error

Apply provides a mock function for the type MockUpdater

func (*MockUpdater) EXPECT

func (_m *MockUpdater) EXPECT() *MockUpdater_Expecter

type MockUpdater_Apply_Call

type MockUpdater_Apply_Call struct {
	*mock.Call
}

MockUpdater_Apply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Apply'

func (*MockUpdater_Apply_Call) Return

func (*MockUpdater_Apply_Call) Run

func (_c *MockUpdater_Apply_Call) Run(run func(update io.Reader)) *MockUpdater_Apply_Call

func (*MockUpdater_Apply_Call) RunAndReturn

func (_c *MockUpdater_Apply_Call) RunAndReturn(run func(update io.Reader) error) *MockUpdater_Apply_Call

type MockUpdater_Expecter

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

func (*MockUpdater_Expecter) Apply

func (_e *MockUpdater_Expecter) Apply(update interface{}) *MockUpdater_Apply_Call

Apply is a helper method to define mock.On call

  • update

type RegisterCmd

type RegisterCmd struct {
	Opts RegisterOpts
	// contains filtered or unexported fields
}

func (*RegisterCmd) Register

func (c *RegisterCmd) Register(p portal.Portal) error

func (*RegisterCmd) RunE

func (c *RegisterCmd) RunE(_ *cobra.Command, args []string) error

type RegisterOpts

type RegisterOpts struct {
	GlobalOptions
	Owner        string
	Organization string
	Role         string
	ExpiresAt    string
}

type RevokeAPIKeyCmd added in v0.9.0

type RevokeAPIKeyCmd struct {
	Opts RevokeAPIKeyOpts
	// contains filtered or unexported fields
}

func (*RevokeAPIKeyCmd) Revoke added in v0.9.0

func (c *RevokeAPIKeyCmd) Revoke(p portal.Portal) error

func (*RevokeAPIKeyCmd) RunE added in v0.9.0

func (c *RevokeAPIKeyCmd) RunE(_ *cobra.Command, args []string) error

type RevokeAPIKeyOpts added in v0.9.0

type RevokeAPIKeyOpts struct {
	GlobalOptions
	ID string
}

type RevokeCmd

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

type SelfUpdater

type SelfUpdater struct{}

func (*SelfUpdater) Apply

func (s *SelfUpdater) Apply(r io.Reader) error

type UpdateCmd

type UpdateCmd struct {
	Version version.Version
	Updater Updater
	// contains filtered or unexported fields
}

func (*UpdateCmd) RunE

func (c *UpdateCmd) RunE(_ *cobra.Command, args []string) error

func (*UpdateCmd) SelfUpdate

func (c *UpdateCmd) SelfUpdate(p portal.Portal) error

type Updater

type Updater interface {
	Apply(update io.Reader) error
}

type UpgradeCephCmd

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

UpgradeCephCmd represents the ceph command

type UpgradeCmd

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

UpgradeCmd represents the upgrade command

type UpgradeCodesphereCmd

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

UpgradeCodesphereCmd represents the codesphere command

type VersionCmd

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

func (*VersionCmd) RunE

func (c *VersionCmd) RunE(_ *cobra.Command, args []string) error

Jump to

Keyboard shortcuts

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