anchore

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ErrConfigNotFound = errors.Sentinel("anchore config not found")

ErrConfigNotFound is returned by config providers to indicate it couldn't find any configuration.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Endpoint   string
	User       string
	Password   string
	Insecure   bool
	PolicyPath string
}

Config holds configuration required for connecting the Anchore API.

type ConfigProvider

type ConfigProvider interface {
	// GetConfiguration returns Anchore configuration for a cluster.
	GetConfiguration(ctx context.Context, clusterID uint) (Config, error)
}

ConfigProvider returns Anchore configuration for a cluster.

type ConfigProviderChain

type ConfigProviderChain []ConfigProvider

ConfigProviderChain loops through a list of providers to fetch a config.

func (ConfigProviderChain) GetConfiguration

func (c ConfigProviderChain) GetConfiguration(ctx context.Context, clusterID uint) (Config, error)

type StaticConfigProvider

type StaticConfigProvider struct {
	Config Config
}

StaticConfigProvider returns static configuration.

func (StaticConfigProvider) GetConfiguration

func (p StaticConfigProvider) GetConfiguration(ctx context.Context, clusterID uint) (Config, error)

Jump to

Keyboard shortcuts

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