mirror of
https://github.com/hauler-dev/hauler.git
synced 2026-02-14 09:59:50 +00:00
* bump cosign fork and tidy Signed-off-by: Adam Martin <adam.martin@ranchergovernment.com> * add --only to hauler store copy Signed-off-by: Adam Martin <adam.martin@ranchergovernment.com> --------- Signed-off-by: Adam Martin <adam.martin@ranchergovernment.com> Co-authored-by: Zack Brady <zackbrady123@gmail.com>
24 lines
780 B
Go
24 lines
780 B
Go
package flags
|
|
|
|
import "github.com/spf13/cobra"
|
|
|
|
type CopyOpts struct {
|
|
*StoreRootOpts
|
|
|
|
Username string
|
|
Password string
|
|
Insecure bool
|
|
PlainHTTP bool
|
|
Only string
|
|
}
|
|
|
|
func (o *CopyOpts) AddFlags(cmd *cobra.Command) {
|
|
f := cmd.Flags()
|
|
|
|
f.StringVarP(&o.Username, "username", "u", "", "(Optional) Username to use for authentication")
|
|
f.StringVarP(&o.Password, "password", "p", "", "(Optional) Password to use for authentication")
|
|
f.BoolVar(&o.Insecure, "insecure", false, "(Optional) Allow insecure connections")
|
|
f.BoolVar(&o.PlainHTTP, "plain-http", false, "(Optional) Allow plain HTTP connections")
|
|
f.StringVarP(&o.Only, "only", "o", "", "(Optional) Custom string array to only copy specific 'image' items, this flag is comma delimited. ex: --only=sig,att,sbom")
|
|
}
|