api

package
v2.0.0-...-98cc131 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentSigningVerifier

type ComponentSigningVerifier struct{}

ComponentSigningVerifier can sign a component version.

func (*ComponentSigningVerifier) Sign

func (c *ComponentSigningVerifier) Sign(componentVersion ocm.ComponentVersionAccess, opts ...OptionFunc) (*metav1.DigestSpec, error)

Sign takes a context and a component and sign it using some default values and various options passed in.

func (*ComponentSigningVerifier) Verify

func (c *ComponentSigningVerifier) Verify(componentVersion ocm.ComponentVersionAccess, opts ...OptionFunc) (*metav1.DigestSpec, error)

Verify takes a context and a component and verifies its signature.

type OptionFunc

type OptionFunc func(opts *Options) error

func WithPrinter

func WithPrinter(printer common.Printer) OptionFunc

WithPrinter allows for passing in a printer option.

func WithSignerOptions

func WithSignerOptions(ctx ocm.Context, sopts *signing.Options) OptionFunc

WithSignerOptions allows for fine-tuning the signing options.

func WithState

func WithState(state signing.WalkingState) OptionFunc

WithState allows fine-tuning the walking state. In reality, the default is sufficient in most cases.

type Options

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

Options defines high level options that can be configured for signing a component.

type Signer

type Signer interface {
	Sign(componentVersion ocm.ComponentVersionAccess, opts ...OptionFunc) (*metav1.DigestSpec, error)
}

Signer can sign objects using specific algorithm or sensible defaults.

type SigningVerifier

type SigningVerifier interface {
	Signer
	Verifier
}

type Verifier

type Verifier interface {
	Verify(componentVersion ocm.ComponentVersionAccess, opts ...OptionFunc) (*metav1.DigestSpec, error)
}

Jump to

Keyboard shortcuts

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