opts

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const OptsVersion int = 0

OptsVersion is the Version of Opts. It can be used for validation.

Variables

View Source
var (
	ErrNoSrcProvided        = errors.New("no/empty source provided")
	ErrMultipleSigningCerts = errors.New("exactly one root certificate is expected")
)

Functions

This section is empty.

Types

type Loader

type Loader func(*Opts) error

Loader modifys the provided *Opts instance.

func WithHTTPSRootCerts

func WithHTTPSRootCerts(reader io.Reader) Loader

func WithHostCfg

func WithHostCfg(reader io.Reader) Loader

func WithSigningRootCert

func WithSigningRootCert(reader io.Reader) Loader

func WithTrustPolicy added in v0.1.0

func WithTrustPolicy(reader io.Reader) Loader

type Opts

type Opts struct {
	Version     int
	TrustPolicy trust.Policy
	HostCfg     host.Config
	SigningRoot *x509.Certificate
	HTTPSRoots  []*x509.Certificate
}

Opts controls the operation of stboot.

func NewOpts

func NewOpts(loaders ...Loader) (*Opts, error)

NewOpts return a new Opts initialized by the provided Loaders.

Jump to

Keyboard shortcuts

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