Documentation
¶
Overview ¶
Package credential translates versioned wire envelopes to Atmos credential types.
Index ¶
- type Decoder
- type Encoder
- type Registry
- func (r *Registry) Decode(envelope *pluginv1.Credentials, allowed []string) (types.ICredentials, error)
- func (r *Registry) Encode(value types.ICredentials, accepted []string) (*pluginv1.Credentials, error)
- func (r *Registry) Register(name string, decoder Decoder) error
- func (r *Registry) RegisterEncoder(prototype types.ICredentials, encoder Encoder) error
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 ¶
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.