cli

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExperimentalEnv = "COSIGN_EXPERIMENTAL"
	ServerEnv       = "REKOR_SERVER"
)

Variables

View Source
var (
	// Read is for fuzzing
	Read = readPasswordFn
)

Functions

func Clean

func Clean() *ffcli.Command

func CleanCmd

func CleanCmd(_ context.Context, imageRef string) error

func Copy

func Copy() *ffcli.Command

func CopyCmd

func CopyCmd(ctx context.Context, srcImg, dstImg string, sigOnly, force bool) error

func Download added in v0.42.0

func Download() *ffcli.Command

func DownloadCmd added in v0.42.0

func DownloadCmd(ctx context.Context, imageRef string) error

func EnableExperimental

func EnableExperimental() bool

func Generate

func Generate() *ffcli.Command

func GenerateCmd

func GenerateCmd(_ context.Context, imageRef string, annotations map[string]interface{}, w io.Writer) error

func GenerateKeyPair

func GenerateKeyPair() *ffcli.Command

func GenerateKeyPairCmd

func GenerateKeyPairCmd(ctx context.Context, kmsVal, k8sRef string) error

func GetPass

func GetPass(confirm bool) ([]byte, error)

func GetPublicKey

func GetPublicKey(ctx context.Context, opts Pkopts, writer NamedWriter, pf cosign.PassFunc) error

func MungeCmd

func MungeCmd(_ context.Context, imageRef string) error

func PrintVerification

func PrintVerification(imgRef string, verified []cosign.SignedPayload, co *cosign.CheckOpts, output string)

PrintVerification logs details about the verification to stdout

func PublicKey

func PublicKey() *ffcli.Command

func Sign

func Sign() *ffcli.Command

func SignBlob

func SignBlob() *ffcli.Command

func SignBlobCmd

func SignBlobCmd(ctx context.Context, ko KeyOpts, payloadPath string, b64 bool, pf cosign.PassFunc, idToken string) ([]byte, error)

func SignCmd

func SignCmd(ctx context.Context, so SignOpts,
	imageRef string, upload bool, payloadPath string, force bool, recursive bool) error

func TlogServer

func TlogServer() string

TlogServer returns the name of the tlog server, can be overwritten via env var

func Triangulate

func Triangulate() *ffcli.Command

func Upload added in v0.42.0

func Upload() *ffcli.Command

func UploadBlob added in v0.42.0

func UploadBlob() *ffcli.Command

func UploadBlobCmd added in v0.42.0

func UploadBlobCmd(ctx context.Context, files []cremote.File, contentType, imageRef string) error

func UploadCmd added in v0.42.0

func UploadCmd(ctx context.Context, sigRef, payloadRef, imageRef string) error

func Verify

func Verify() *ffcli.Command

Verify builds and returns an ffcli command

func VerifyBlob

func VerifyBlob() *ffcli.Command

func VerifyBlobCmd

func VerifyBlobCmd(ctx context.Context, ko KeyOpts, certRef, sigRef, blobRef string) error

func Version

func Version() *ffcli.Command

Types

type Files added in v0.42.0

type Files struct {
	Files []cremote.File
}

func (*Files) Set added in v0.42.0

func (fs *Files) Set(k string) error

func (*Files) String added in v0.42.0

func (fs *Files) String() string

type Info

type Info struct {
	GitVersion   string
	GitCommit    string
	GitTreeState string
	BuildDate    string
	GoVersion    string
	Compiler     string
	Platform     string
}

func VersionInfo

func VersionInfo() Info

func (*Info) JSONString

func (i *Info) JSONString() (string, error)

JSONString returns the JSON representation of the version info

func (*Info) String

func (i *Info) String() string

String returns the string representation of the version info

type KeyOpts

type KeyOpts struct {
	Sk     bool
	KeyRef string
}

type KeyParseError

type KeyParseError struct{}

KeyParseError is an error returned when an incorrect set of key flags are parsed by the CLI

func (*KeyParseError) Error

func (e *KeyParseError) Error() string

type NamedWriter

type NamedWriter struct {
	Name string
	io.Writer
}

type Pkopts

type Pkopts struct {
	KeyRef string
	Sk     bool
}

type SignOpts

type SignOpts struct {
	Annotations map[string]interface{}
	KeyRef      string
	Sk          bool
	Pf          cosign.PassFunc
	IDToken     string
}

type SignatureArgType added in v0.42.0

type SignatureArgType uint8
const (
	StdinSignature SignatureArgType = iota
	RawSignature   SignatureArgType = iota
	FileSignature  SignatureArgType = iota
)

type VerifyCommand

type VerifyCommand struct {
	CheckClaims bool
	KeyRef      string
	Sk          bool
	Slot        string
	Output      string
	Annotations *map[string]interface{}
}

VerifyCommand verifies a signature on a supplied container image

func (*VerifyCommand) Exec

func (c *VerifyCommand) Exec(ctx context.Context, args []string) (err error)

Exec runs the verification command

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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