cli

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: Apache-2.0 Imports: 31 Imported by: 17

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 added in v0.2.0

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

func MungeCmd

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

func PublicKey added in v0.2.0

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) ([]byte, error)

func SignCmd

func SignCmd(ctx context.Context, so SignOpts,
	imageRef string, upload bool, payloadPath string, 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, ko KeyOpts, certRef, sigRef, blobRef string) error

func Version

func Version() *ffcli.Command

Types

type Info added in v0.3.0

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 added in v0.3.0

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

JSONString returns the JSON representation of the version info

func (*Info) String added in v0.3.0

func (i *Info) String() string

String returns the string representation of the version info

type KeyOpts added in v0.3.0

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 added in v0.3.0

type NamedWriter struct {
	Name string
	io.Writer
}

type Pkopts added in v0.3.0

type Pkopts struct {
	KeyRef string
	Sk     bool
}

type SignOpts added in v0.3.0

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

type SignatureArgType

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

type VerifyCommand added in v0.2.0

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

VerifyCommand verifies a signature on a supplied container image

func (*VerifyCommand) Exec added in v0.2.0

func (c *VerifyCommand) Exec(ctx context.Context, args []string) 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