fspkg

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Package

type Package struct {
	// Name contains a friendly name for the bundle
	Name string `json:"name"`

	// Bundle contains the PEM-formatted certificates which are provided by this bundle.
	Bundle string `json:"bundle"`

	// Version identifies the bundle's version, to distinguish updated bundles from older counterparts
	Version string `json:"version"`
}

Package specifies the structure of JSON packages which can be read from the filesystem of the trust-manager container and subsequently used in a Bundle resource. Note that this struct must be both forwards and backwards compatible. Any JSON which marshals / unmarshals from this struct should be readable by every version of trust-manager which supports loading default CA packages.

func LoadPackage

func LoadPackage(reader io.Reader) (Package, error)

LoadPackage tries to read a package from the given reader, checking that it only contains valid certificates

func LoadPackageFromFile

func LoadPackageFromFile(path string) (Package, error)

LoadPackageFromFile uses LoadPackage to read a JSON file specifying a package

func (*Package) Clone

func (p *Package) Clone() *Package

Clone returns a new copy of the given package

func (Package) StringID

func (p Package) StringID() string

StringID returns a human-readable string ID which should allow one package to be easily distinguished from another.

func (*Package) Validate

func (p *Package) Validate() error

Validate checks that the given package is valid. All packages must successfully validate before being accepted for use.

Jump to

Keyboard shortcuts

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