credential

package
v1.235.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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