cli

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func Download

func Download() *ffcli.Command

func DownloadCmd

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

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 string) error

func GetPass

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

func GetPublicKey

func GetPublicKey(ctx context.Context, reader io.Reader, kmsVal string, writer NamedWriter, pf cosign.PassFunc) error

func MungeCmd

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

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, keyPath, kmsVal, payloadPath string, b64 bool, pf cosign.PassFunc) ([]byte, error)

func SignCmd

func SignCmd(ctx context.Context, keyPath string,
	imageRef string, upload bool, payloadPath string,
	annotations map[string]interface{}, kmsVal string, pf cosign.PassFunc, force bool) error

func Triangulate

func Triangulate() *ffcli.Command

func Upload

func Upload() *ffcli.Command

func UploadCmd

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, keyRef, kmsVal, certRef, sigRef, blobRef string) error

func Version

func Version() *ffcli.Command

Types

type Annotation

type Annotation struct {
	// contains filtered or unexported fields
}

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

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

type VerifyCommand

type VerifyCommand struct {
	CheckClaims bool
	KmsVal      string
	Key         string
	Output      string
	Annotations *map[string]interface{}
	PayloadPath string
}

VerifyCommand verifies a signature on a supplied container image

func (*VerifyCommand) Exec

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

Exec runs the verification command

Jump to

Keyboard shortcuts

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