cmd

package
v0.0.0-...-22305c1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultClientOptions = ClientOptions{
	Server:     "",
	AuthServer: "",
	Token:      "",
	Org:        "",
	UseREST:    false,
	Insecure:   false,
}

Functions

func AddAuth

func AddAuth(parent *cobra.Command)

AddAuth adds the auth command and its subcommands to the parent.

func AddDelete

func AddDelete(parent *cobra.Command)

AddDelete adds the delete command to the parent.

func AddGet

func AddGet(parent *cobra.Command)

AddGet adds the get command to the parent.

func AddList

func AddList(parent *cobra.Command)

AddList adds the list command to the parent.

func AddPolicy

func AddPolicy(parent *cobra.Command)

AddPolicy adds the policy command and its subcommands to the parent.

func AddPublicKey

func AddPublicKey(parent *cobra.Command)

AddPublicKey adds the publickey command and its subcommands to the parent.

func AddPush

func AddPush(parent *cobra.Command)

AddPush adds the push command to the parent.

func AddUpdate

func AddUpdate(parent *cobra.Command)

AddUpdate adds the update command to the parent.

func AddVerify

func AddVerify(parent *cobra.Command)

AddVerify adds the verify command to the parent.

Types

type ClientOptions

type ClientOptions struct {
	Server     string
	AuthServer string
	Token      string
	Org        string
	UseREST    bool
	Insecure   bool
}

ClientOptions contains the common client connection options.

func (*ClientOptions) AddFlags

func (co *ClientOptions) AddFlags(cmd *cobra.Command)

func (*ClientOptions) Config

func (co *ClientOptions) Config() *command.OptionsSetConfig

func (*ClientOptions) GetOrg

func (co *ClientOptions) GetOrg() (string, error)

GetOrg returns the organization ID from options or environment.

func (*ClientOptions) NewClient

func (co *ClientOptions) NewClient(ctx context.Context, orgID, namespace string) (client.StashClient, func(), error)

NewClient creates a new Stash client based on the configured options.

func (*ClientOptions) Validate

func (co *ClientOptions) Validate() error

type DeleteOptions

type DeleteOptions struct {
	ClientOptions
}

DeleteOptions holds the options for the delete command.

func (*DeleteOptions) AddFlags

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

func (*DeleteOptions) Config

func (o *DeleteOptions) Config() *command.OptionsSetConfig

func (*DeleteOptions) Validate

func (o *DeleteOptions) Validate() error

type GetOptions

type GetOptions struct {
	ClientOptions
	Raw       bool
	Predicate bool
}

GetOptions holds the options for the get command.

func (*GetOptions) AddFlags

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

func (*GetOptions) Config

func (o *GetOptions) Config() *command.OptionsSetConfig

func (*GetOptions) Validate

func (o *GetOptions) Validate() error

type ListOptions

type ListOptions struct {
	ClientOptions
	Namespace        string
	PredicateType    string
	SubjectName      string
	SubjectURI       string
	SubjectNameRegex string
	SubjectURIRegex  string
	SubjectDigest    []string // Raw digest strings in format "algo:value"
	SignerIdentity   string
	SignedOnly       bool
	ValidatedOnly    bool
	Limit            int
	Cursor           string
	JSON             bool
}

ListOptions holds the options for the list command.

func (*ListOptions) AddFlags

func (lo *ListOptions) AddFlags(cmd *cobra.Command)

func (*ListOptions) Config

func (lo *ListOptions) Config() *command.OptionsSetConfig

func (*ListOptions) Validate

func (lo *ListOptions) Validate() error

type PolicyAppendOptions

type PolicyAppendOptions struct {
	ClientOptions
	Stdin     bool
	Namespace string
	Lineage   string
}

func (*PolicyAppendOptions) AddFlags

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

func (*PolicyAppendOptions) Config

func (*PolicyAppendOptions) Validate

func (o *PolicyAppendOptions) Validate() error

type PolicyDeleteOptions

type PolicyDeleteOptions struct {
	ClientOptions
	Namespace string
	Lineage   string
	Version   int64
}

func (*PolicyDeleteOptions) AddFlags

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

func (*PolicyDeleteOptions) Config

func (*PolicyDeleteOptions) Validate

func (o *PolicyDeleteOptions) Validate() error

type PolicyGetOptions

type PolicyGetOptions struct {
	ClientOptions
	Namespace string
	Lineage   string
	Version   int64
	Raw       bool
}

func (*PolicyGetOptions) AddFlags

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

func (*PolicyGetOptions) Config

func (*PolicyGetOptions) Validate

func (o *PolicyGetOptions) Validate() error

type PolicyListOptions

type PolicyListOptions struct {
	ClientOptions
	Namespace string
}

func (*PolicyListOptions) AddFlags

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

func (*PolicyListOptions) Config

func (*PolicyListOptions) Validate

func (o *PolicyListOptions) Validate() error

type PolicyPushOptions

type PolicyPushOptions struct {
	ClientOptions
	Stdin     bool
	Namespace string
}

func (*PolicyPushOptions) AddFlags

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

func (*PolicyPushOptions) Config

func (*PolicyPushOptions) Validate

func (o *PolicyPushOptions) Validate() error

type PolicyVersionsOptions

type PolicyVersionsOptions struct {
	ClientOptions
	Namespace string
	Lineage   string
}

func (*PolicyVersionsOptions) AddFlags

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

func (*PolicyVersionsOptions) Config

func (*PolicyVersionsOptions) Validate

func (o *PolicyVersionsOptions) Validate() error

type PublicKeyDeleteOptions

type PublicKeyDeleteOptions struct {
	ClientOptions
}

func (*PublicKeyDeleteOptions) AddFlags

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

func (*PublicKeyDeleteOptions) Config

func (*PublicKeyDeleteOptions) Validate

func (o *PublicKeyDeleteOptions) Validate() error

type PublicKeyListOptions

type PublicKeyListOptions struct {
	ClientOptions
	JSON bool
}

func (*PublicKeyListOptions) AddFlags

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

func (*PublicKeyListOptions) Config

func (*PublicKeyListOptions) Validate

func (o *PublicKeyListOptions) Validate() error

type PublicKeyUploadOptions

type PublicKeyUploadOptions struct {
	ClientOptions
}

func (*PublicKeyUploadOptions) AddFlags

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

func (*PublicKeyUploadOptions) Config

func (*PublicKeyUploadOptions) Validate

func (o *PublicKeyUploadOptions) Validate() error

type PushOptions

type PushOptions struct {
	ClientOptions
	Stdin     bool
	Namespace string
}

PushOptions holds the options for the push command.

func (*PushOptions) AddFlags

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

func (*PushOptions) Config

func (o *PushOptions) Config() *command.OptionsSetConfig

func (*PushOptions) Validate

func (o *PushOptions) Validate() error

type UpdateOptions

type UpdateOptions struct {
	ClientOptions
}

UpdateOptions holds the options for the update command.

func (*UpdateOptions) AddFlags

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

func (*UpdateOptions) Config

func (o *UpdateOptions) Config() *command.OptionsSetConfig

func (*UpdateOptions) Validate

func (o *UpdateOptions) Validate() error

type VerifyOptions

type VerifyOptions struct {
	ClientOptions
}

VerifyOptions holds the options for the verify command.

func (*VerifyOptions) AddFlags

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

func (*VerifyOptions) Config

func (o *VerifyOptions) Config() *command.OptionsSetConfig

func (*VerifyOptions) Validate

func (o *VerifyOptions) Validate() error

Jump to

Keyboard shortcuts

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