dockerconfig

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: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Type   = "DockerConfig"
	TypeV1 = Type + runtime.VersionSeparator + "v1"
)
View Source
const ATTR_REPOS = "github.com/open-component-model/ocm/v2/pkg/contexts/credentials/repositories/dockerconfig"
View Source
const PROVIDER = "ocm.software/credentialprovider/" + Type

Variables

View Source
var REALM = ocmlog.DefineSubRealm("docker config handling as credential repository", "credentials/dockerconfig")

Functions

func IsEmptyAuthConfig

func IsEmptyAuthConfig(auth types.AuthConfig) bool

IsEmptyAuthConfig validates if the resulting auth config contains credentials.

func NewCredentials

func NewCredentials(cfg *configfile.ConfigFile, name string, store dockercred.Store) cpi.Credentials

NewCredentials describes a default getter method for a authentication method.

Types

type ConsumerProvider

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

func (*ConsumerProvider) Get

func (*ConsumerProvider) Unregister

func (p *ConsumerProvider) Unregister(id cpi.ProviderIdentity)

type Credentials

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

func (*Credentials) Credentials

func (c *Credentials) Credentials(context cpi.Context, source ...cpi.CredentialsSource) (cpi.Credentials, error)

func (*Credentials) ExistsProperty

func (c *Credentials) ExistsProperty(name string) bool

func (*Credentials) GetProperty

func (c *Credentials) GetProperty(name string) string

func (*Credentials) Properties

func (c *Credentials) Properties() common.Properties

func (*Credentials) PropertyNames

func (c *Credentials) PropertyNames() generics.Set[string]

type Repositories

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

func (*Repositories) GetRepository

func (r *Repositories) GetRepository(ctx cpi.Context, name string, data []byte, propagate bool) (*Repository, error)

type Repository

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

func NewRepository

func NewRepository(ctx cpi.Context, path string, data []byte, propagate bool) (*Repository, error)

func (*Repository) ExistsCredentials

func (r *Repository) ExistsCredentials(name string) (bool, error)

func (*Repository) LookupCredentials

func (r *Repository) LookupCredentials(name string) (cpi.Credentials, error)

func (*Repository) Read

func (r *Repository) Read(force bool) error

func (*Repository) WriteCredentials

func (r *Repository) WriteCredentials(name string, creds cpi.Credentials) (cpi.Credentials, error)

type RepositorySpec

type RepositorySpec struct {
	runtime.ObjectVersionedType `json:",inline"`
	DockerConfigFile            string          `json:"dockerConfigFile,omitempty"`
	DockerConfig                json.RawMessage `json:"dockerConfig,omitempty"`
	PropgateConsumerIdentity    bool            `json:"propagateConsumerIdentity,omitempty"`
}

RepositorySpec describes a docker config based credential repository interface.

func NewRepositorySpec

func NewRepositorySpec(path string, prop ...bool) *RepositorySpec

NewRepositorySpec creates a new memory RepositorySpec.

func NewRepositorySpecForConfig

func NewRepositorySpecForConfig(data []byte, prop ...bool) *RepositorySpec

func (*RepositorySpec) GetType

func (a *RepositorySpec) GetType() string

func (*RepositorySpec) Repository

func (a *RepositorySpec) Repository(ctx cpi.Context, creds cpi.Credentials) (cpi.Repository, error)

func (RepositorySpec) WithConsumerPropagation

func (s RepositorySpec) WithConsumerPropagation(propagate bool) *RepositorySpec

Jump to

Keyboard shortcuts

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