config

package
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FileName string

FileName is the filename for the voucher configuration

Functions

func GetOrganizationsFromConfig

func GetOrganizationsFromConfig() map[string]repository.Organization

func GetRequiredChecksFromConfig

func GetRequiredChecksFromConfig() map[string][]string

func InitConfig

func InitConfig()

InitConfig searches for and loads configuration file for voucher

func IsCloudRun added in v2.7.0

func IsCloudRun() bool

func MetricsClient

func MetricsClient(secrets *Secrets) (metrics.Client, error)

func NewAttestationSigner

func NewAttestationSigner(secrets *Secrets) signer.AttestationSigner

NewAttestationSigner creates a new attestation signer

func NewCheckSuite

func NewCheckSuite(secrets *Secrets, metadataClient voucher.MetadataClient, repositoryClient repository.Client, names ...string) (*voucher.Suite, error)

NewCheckSuite creates a new checks.Suite with the requested Checks, passing any necessary configuration details to the checks.

func NewMetadataClient

func NewMetadataClient(ctx context.Context, secrets *Secrets) (voucher.MetadataClient, error)

NewMetadataClient creates a new MetadataClient.

func NewRepositoryClient

func NewRepositoryClient(ctx context.Context, keyring repository.KeyRing, repoURL string) (repository.Client, error)

NewRepositoryClient creates a new repository.Client for the given repository URL. The URL may be in any known format including, but not limited to, urls starting with 'http://', 'https://', 'git@', etc.

func RegisterDynamicChecks

func RegisterDynamicChecks()

Types

type DatadogSecrets

type DatadogSecrets struct {
	APIKey string `json:"api_key"`
	AppKey string `json:"app_key"`
}

type Secrets

type Secrets struct {
	Keys                     map[string]string  `json:"openpgpkeys"`
	ClairConfig              clair.Config       `json:"clair"`
	RepositoryAuthentication repository.KeyRing `json:"repositories"`
	Datadog                  DatadogSecrets     `json:"datadog"`
}

Secrets represents the format that the ejson configuration is structured in.

func ReadSecrets

func ReadSecrets() (*Secrets, error)

ReadSecrets reads from the ejson file and populates the passed interface.

Jump to

Keyboard shortcuts

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