Documentation
¶
Index ¶
- func NewIdentity(name string, config *schema.Identity) (types.Identity, error)
- func NewProvider(name string, config *schema.Provider) (types.Provider, error)
- func RegisterGCPIdentities(f *Factory)
- func RegisterGCPProviders(f *Factory)
- type ConfigSetter
- type Factory
- func (f *Factory) CreateIdentity(kind, name string, principal map[string]any) (types.Identity, error)
- func (f *Factory) CreateProvider(kind, name string, spec map[string]any) (types.Provider, error)
- func (f *Factory) HasIdentity(kind string) bool
- func (f *Factory) HasProvider(kind string) bool
- func (f *Factory) RegisterIdentity(kind string, constructor IdentityConstructor)
- func (f *Factory) RegisterProvider(kind string, constructor ProviderConstructor)
- type IdentityConstructor
- type ProviderConstructor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewIdentity ¶
NewIdentity creates a new identity instance based on the identity configuration.
func NewProvider ¶
NewProvider creates a new provider instance based on the provider configuration.
func RegisterGCPIdentities ¶
func RegisterGCPIdentities(f *Factory)
RegisterGCPIdentities registers all GCP identity constructors with the factory.
func RegisterGCPProviders ¶
func RegisterGCPProviders(f *Factory)
RegisterGCPProviders registers all GCP provider constructors with the factory.
Types ¶
type ConfigSetter ¶
ConfigSetter is an optional interface for identities that need access to the full config. Used by GCP identities to access Via.Provider for whoami reporting.
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory manages provider and identity registration.
func NewFactory ¶
func NewFactory() *Factory
NewFactory creates a new auth factory with all providers and identities registered.
func (*Factory) CreateIdentity ¶
func (f *Factory) CreateIdentity(kind, name string, principal map[string]any) (types.Identity, error)
CreateIdentity creates an identity instance from kind, name, and principal.
func (*Factory) CreateProvider ¶
CreateProvider creates a provider instance from kind, name, and spec.
func (*Factory) HasIdentity ¶
HasIdentity checks if an identity kind is registered.
func (*Factory) HasProvider ¶
HasProvider checks if a provider kind is registered.
func (*Factory) RegisterIdentity ¶
func (f *Factory) RegisterIdentity(kind string, constructor IdentityConstructor)
RegisterIdentity registers an identity constructor for a kind.
func (*Factory) RegisterProvider ¶
func (f *Factory) RegisterProvider(kind string, constructor ProviderConstructor)
RegisterProvider registers a provider constructor for a kind.
type IdentityConstructor ¶
IdentityConstructor creates an identity from name and principal.