config

package
v2.0.0-...-98cc131 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ConfigType   = "memory.credentials" + cfgcpi.OCM_CONFIG_TYPE_SUFFIX
	ConfigTypeV1 = ConfigType + runtime.VersionSeparator + "v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	runtime.ObjectVersionedType `json:",inline"`
	RepoName                    string            `json:"repoName"`
	Credentials                 []CredentialsSpec `json:"credentials,omitempty"`
}

Config describes a configuration for the config context.

func New

func New(repo string, credentials ...CredentialsSpec) *Config

New creates a new memory ConfigSpec.

func (*Config) AddCredentials

func (a *Config) AddCredentials(name string, props common.Properties) error

func (*Config) AddCredentialsRef

func (a *Config) AddCredentialsRef(name string, refname string, spec cpi.RepositorySpec) error

func (*Config) ApplyTo

func (a *Config) ApplyTo(ctx cfgcpi.Context, target interface{}) error

func (*Config) GetType

func (a *Config) GetType() string

type CredentialsSpec

type CredentialsSpec struct {
	CredentialsName string `json:"credentialsName"`
	// Reference refers to credentials store in some othe repo
	Reference *cpi.GenericCredentialsSpec `json:"reference,omitempty"`
	// Credentials are direct credentials (one of Reference or Credentials must be set)
	Credentials common.Properties `json:"credentials"`
}

Jump to

Keyboard shortcuts

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