Documentation
¶
Index ¶
- Variables
- func AddAuth(parent *cobra.Command)
- func AddDelete(parent *cobra.Command)
- func AddGet(parent *cobra.Command)
- func AddList(parent *cobra.Command)
- func AddPublicKey(parent *cobra.Command)
- func AddPush(parent *cobra.Command)
- func AddUpdate(parent *cobra.Command)
- func AddVerify(parent *cobra.Command)
- type ClientOptions
- func (co *ClientOptions) AddFlags(cmd *cobra.Command)
- func (co *ClientOptions) Config() *command.OptionsSetConfig
- func (co *ClientOptions) GetOrg() (string, error)
- func (co *ClientOptions) NewClient(ctx context.Context, orgID, namespace string) (client.StashClient, func(), error)
- func (co *ClientOptions) Validate() error
- type DeleteOptions
- type GetOptions
- type ListOptions
- type PublicKeyDeleteOptions
- type PublicKeyListOptions
- type PublicKeyUploadOptions
- type PushOptions
- type UpdateOptions
- type VerifyOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClientOptions = ClientOptions{ Server: "", AuthServer: "", Token: "", Org: "", UseREST: false, Insecure: false, }
Functions ¶
func AddPublicKey ¶
AddPublicKey adds the publickey command and its subcommands 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 (o *PublicKeyDeleteOptions) Config() *command.OptionsSetConfig
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 (o *PublicKeyListOptions) Config() *command.OptionsSetConfig
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 (o *PublicKeyUploadOptions) Config() *command.OptionsSetConfig
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
Click to show internal directories.
Click to hide internal directories.