credential

package
v1.234.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package credential translates versioned wire envelopes to Atmos credential types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder func(*pluginv1.Credentials) (types.ICredentials, error)

Decoder validates and decodes one credential contract.

type Encoder

type Encoder func(types.ICredentials) (*pluginv1.Credentials, error)

Encoder converts a concrete Atmos credential to a versioned wire contract.

type Registry

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

Registry rejects unknown contracts instead of guessing a cloud credential shape.

func New

func New() *Registry

New registers the first release's AWS and OIDC credential contracts.

func (*Registry) Decode

func (r *Registry) Decode(envelope *pluginv1.Credentials, allowed []string) (types.ICredentials, error)

Decode validates the common envelope before dispatching to a registered codec.

func (*Registry) Encode

func (r *Registry) Encode(value types.ICredentials, accepted []string) (*pluginv1.Credentials, error)

Encode supplies upstream credentials only if their contract is accepted by the identity.

func (*Registry) Register

func (r *Registry) Register(name string, decoder Decoder) error

Register adds a credential contract without replacing a built-in decoder.

func (*Registry) RegisterEncoder

func (r *Registry) RegisterEncoder(prototype types.ICredentials, encoder Encoder) error

RegisterEncoder adds an upstream credential type without replacing an existing mapping.

Jump to

Keyboard shortcuts

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