Documentation
¶
Index ¶
- Constants
- func NewCmdAdd(io genericiooptions.IOStreams) *cobra.Command
- func NewCmdInit() *cobra.Command
- func NewCmdList(io genericiooptions.IOStreams) *cobra.Command
- func NewCmdLogin(ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdMod(streams genericiooptions.IOStreams) *cobra.Command
- func NewCmdPull(ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdPush(ioStreams genericiooptions.IOStreams) *cobra.Command
- type AddFlag
- type AddOptions
- type InitOptions
- type ListFlag
- type ListOption
- type LoginModFlags
- type LoginModOptions
- type PullModFlags
- type PullModOptions
- type PushModFlags
- type PushModOptions
Constants ¶
const LatestVersion = "latest"
LatestVersion is the tag name that denotes the latest stable version of a module.
Variables ¶
This section is empty.
Functions ¶
func NewCmdInit ¶
NewCmdInit returns an initialized Command instance for the 'mod init' sub command
func NewCmdList ¶ added in v0.12.0
func NewCmdList(io genericiooptions.IOStreams) *cobra.Command
func NewCmdLogin ¶ added in v0.14.0
func NewCmdLogin(ioStreams genericiooptions.IOStreams) *cobra.Command
NewCmdLogin returns an initialized Command instance for the `mod login` sub command.
func NewCmdMod ¶
func NewCmdMod(streams genericiooptions.IOStreams) *cobra.Command
NewCmdMod returns an initialized Command instance for 'mod' sub command
func NewCmdPull ¶ added in v0.14.0
func NewCmdPull(ioStreams genericiooptions.IOStreams) *cobra.Command
NewCmdPull returns an initialized Command instance for the `mod pull` sub command.
func NewCmdPush ¶
func NewCmdPush(ioStreams genericiooptions.IOStreams) *cobra.Command
NewCmdPush returns an initialized Command instance for the 'mod push' sub command.
Types ¶
type AddOptions ¶ added in v0.12.0
type AddOptions struct { meta.MetaOptions // ModuleName referenced the module name to be added to the kcl.mod file. ModuleName string // IOStreams referenced the target IOStreams for this invocation. IO genericiooptions.IOStreams }
func (*AddOptions) Run ¶ added in v0.12.0
func (o *AddOptions) Run() error
type InitOptions ¶
func (*InitOptions) Run ¶
func (o *InitOptions) Run() error
func (*InitOptions) Validate ¶
func (o *InitOptions) Validate(args []string) error
type ListOption ¶ added in v0.12.0
type ListOption struct { // Workspace referenced the workspace for this CLI invocation. Workspace *v1.Workspace // StorageBackend referenced the target storage backend for this CLI invocation. StorageBackend backend.Backend // IOStreams referenced the target IOStreams for this CLI invocation. IO genericiooptions.IOStreams }
func (*ListOption) Run ¶ added in v0.12.0
func (o *ListOption) Run() error
type LoginModFlags ¶ added in v0.14.0
type LoginModFlags struct { Username string Password string genericiooptions.IOStreams }
LoginModFlags directly reflects the information that CLI is gathering via flags. They will be converted to LoginModOptions, which reflects the runtime requirements for the command.
func NewLoginModFlags ¶ added in v0.14.0
func NewLoginModFlags(ioStreams genericiooptions.IOStreams) *LoginModFlags
NewLoginModFlags returns a default LoginModFlags.
func (*LoginModFlags) AddFlags ¶ added in v0.14.0
func (flags *LoginModFlags) AddFlags(cmd *cobra.Command)
AddFlags registers flags for a cli.
func (*LoginModFlags) ToOptions ¶ added in v0.14.0
func (flags *LoginModFlags) ToOptions(args []string, ioStreams genericiooptions.IOStreams) (*LoginModOptions, error)
ToOptions converts from CLI inputs to runtime inputs.
type LoginModOptions ¶ added in v0.14.0
type LoginModOptions struct { Host string Username string Password string genericiooptions.IOStreams }
LoginModOptions is a set of options that allows you to login to a oci registry for kusion module artifacts. This is the object reflects the runtime needs of a `mod login` command, making the logic itself easy to unit test.
func (*LoginModOptions) Run ¶ added in v0.14.0
func (o *LoginModOptions) Run() (err error)
Run executes the `mod login` command.
func (*LoginModOptions) Validate ¶ added in v0.14.0
func (o *LoginModOptions) Validate() error
Validate verifies if LoginModOptions is valid and without conflicts.
type PullModFlags ¶ added in v0.14.0
type PullModFlags struct { Host string Username string Password string genericiooptions.IOStreams }
PullModFlags directly reflects the information that CLI is gathering via flags. They will be converted to PullModOptions, which reflects the runtime requirements for the command.
This structure reduces the transformation to wiring and makes the logic itself easy to unit test.
func NewPullModFlags ¶ added in v0.14.0
func NewPullModFlags(ioStreams genericiooptions.IOStreams) *PullModFlags
NewPullModFlags returns a default PullModFlags.
func (*PullModFlags) AddFlags ¶ added in v0.14.0
func (flags *PullModFlags) AddFlags(cmd *cobra.Command)
AddFlags registers flags for a cli.
func (*PullModFlags) ToOptions ¶ added in v0.14.0
func (flags *PullModFlags) ToOptions(args []string, ioStreams genericiooptions.IOStreams) (*PullModOptions, error)
ToOptions converts from CLI inputs to runtime inputs.
type PullModOptions ¶ added in v0.14.0
type PullModOptions struct { Dir string Host string Username string Password string genericiooptions.IOStreams }
PullModOptions is a set of options that allows you to push module. This is the object reflects the runtime needs of a `mod pull` command, making the logic itself easy to unit test.
func (*PullModOptions) Run ¶ added in v0.14.0
func (o *PullModOptions) Run() (err error)
Run executes the `mod pull` command.
func (*PullModOptions) Validate ¶ added in v0.14.0
func (o *PullModOptions) Validate() error
Validate verifies if PullModOptions is valid and without conflicts.
type PushModFlags ¶
type PushModFlags struct { Latest bool OSArch string Annotations []string Credentials string Sign string CosignKey string InsecureRegistry bool genericiooptions.IOStreams }
PushModFlags directly reflect the information that CLI is gathering via flags. They will be converted to PushModOptions, which reflect the runtime requirements for the command.
This structure reduces the transformation to wiring and makes the logic itself easy to unit test.
func NewPushModFlags ¶
func NewPushModFlags(ioStreams genericiooptions.IOStreams) *PushModFlags
NewPushModFlags returns a default PushModFlags.
func (*PushModFlags) AddFlags ¶
func (flags *PushModFlags) AddFlags(cmd *cobra.Command)
AddFlags registers flags for a cli.
func (*PushModFlags) ToOptions ¶
func (flags *PushModFlags) ToOptions(args []string, ioStreams genericiooptions.IOStreams) (*PushModOptions, error)
ToOptions converts from CLI inputs to runtime inputs.
type PushModOptions ¶
type PushModOptions struct { ModulePath string OCIUrl string Latest bool OSArch string Name string Version string Sign string CosignKey string Client *ociclient.Client Metadata metadata.Metadata genericiooptions.IOStreams }
PushModOptions is a set of options that allows you to push module. This is the object reflects the runtime needs of a `mod push` command, making the logic itself easy to unit test.
func (*PushModOptions) Run ¶
func (o *PushModOptions) Run() error
Run executes the `mod push` command.
func (*PushModOptions) Validate ¶
func (o *PushModOptions) Validate() error
Validate verifies if PushModOptions are valid and without conflicts.