cmd

package
v0.0.0-...-8171400 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

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 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 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