catalog

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

type Catalog interface {
	GetBundleSigner() []integrity.Signer
	GetBundleVerifiers() []integrity.Verifier
}

Catalog is a collection of provider interfaces.

type ProvidersConfig

type ProvidersConfig struct {
	BundleSigner    *providerConfig   `hcl:"BundleSigner,block"`
	BundleVerifiers []*providerConfig `hcl:"BundleVerifier,block"`
}

ProvidersConfig holds the HCL configuration for the providers.

func ProvidersConfigsFromHCLBody

func ProvidersConfigsFromHCLBody(body hcl.Body) (*ProvidersConfig, error)

ProvidersConfigsFromHCLBody parses the HCL body and returns the providers configuration.

type ProvidersRepository

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

ProvidersRepository is the implementation of the Catalog interface.

func New

func New() *ProvidersRepository

New creates a new ProvidersRepository. It is the responsibility of the caller to load the catalog with providers using LoadFromProvidersConfig.

func (*ProvidersRepository) GetBundleSigner

func (c *ProvidersRepository) GetBundleSigner() integrity.Signer

func (*ProvidersRepository) GetBundleVerifiers

func (c *ProvidersRepository) GetBundleVerifiers() []integrity.Verifier

func (*ProvidersRepository) LoadFromProvidersConfig

func (c *ProvidersRepository) LoadFromProvidersConfig(config *ProvidersConfig) error

LoadFromProvidersConfig loads the catalog from HCL configuration.

Jump to

Keyboard shortcuts

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