ibmiam

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 38

Documentation

Index

Constants

View Source
const CustomInitFuncProviderName = "CustomInitFuncProviderIBM"

CustomInitFuncProviderName the Name of the IBM IAM provider with a custom init function

View Source
const EnvProviderName = "EnvProviderIBM"

EnvProviderName name of the IBM IAM provider that loads IAM credentials from environment variables

View Source
const (
	// SharedConfProviderName of the IBM IAM provider that loads IAM credentials
	// from shared config
	SharedConfProviderName = "SharedConfigProviderIBM"
)
View Source
const (
	// SharedCredsProviderName name of the IBM IAM provider that loads IAM credentials
	// from shared credentials file
	SharedCredsProviderName = "SharedCredentialsProviderIBM"
)
View Source
const StaticProviderName = "StaticProviderIBM"

StaticProviderName name of the IBM IAM provider that uses IAM details passed directly

Variables

This section is empty.

Functions

func NewConfigCredentials

func NewConfigCredentials(config *aws.Config, filename, profilename string) *credentials.Credentials

NewConfigCredentials Constructor

func NewCustomInitFuncCredentials

func NewCustomInitFuncCredentials(config *aws.Config, initFunc func() (*token.Token, error), authEndPoint,
	serviceInstanceID string) *credentials.Credentials

NewCustomInitFuncCredentials costructor

func NewEnvCredentials

func NewEnvCredentials(config *aws.Config) *credentials.Credentials

NewEnvCredentials Constructor

func NewSharedCredentials

func NewSharedCredentials(config *aws.Config, filename, profilename string) *credentials.Credentials

NewSharedCredentials constructor for IBM IAM that uses IAM credentials passed in Returns:

credentials.NewCredentials(newSharedCredentialsProvider()) (AWS type)

func NewStaticCredentials

func NewStaticCredentials(config *aws.Config, authEndPoint, apiKey, serviceInstanceID string) *credentials.Credentials

NewStaticCredentials constructor for IBM IAM that uses IAM credentials passed in Returns: credentials.NewCredentials(newStaticProvider()) (AWS type)

Types

type Provider

type Provider struct {

	// Error
	ErrorStatus error
	// contains filtered or unexported fields
}

Provider Struct

func NewCustomInitFuncProvider

func NewCustomInitFuncProvider(config *aws.Config, initFunc func() (*token.Token, error), authEndPoint,
	serviceInstanceID string, client tokenmanager.IBMClientDo) *Provider

NewCustomInitFuncProvider constructor of IBM IAM Provider with a custom init Function Parameters:

aws.config: AWS Config to provide service configuration for service clients. By default,
	all clients will use the defaults.DefaultConfig structure.
initFunc token: Contents of the token
authEndPoint: IAM Authentication Server end point
serviceInstanceID: service instance ID of the IBM account
client: Token Management's client

Returns:

A complete Provider with Token Manager initialized

func NewEnvProvider

func NewEnvProvider(config *aws.Config) *Provider

NewEnvProvider constructor of the IBM IAM provider that loads IAM credentials from environment variables Parameter:

AWS Config

Returns:

A new provider with AWS config, API Key, IBM IAM Authentication Server Endpoint and
Service Instance ID

func NewProvider

func NewProvider(providerName string, config *aws.Config, apiKey, authEndPoint, serviceInstanceID string,
	client tokenmanager.IBMClientDo) (provider *Provider)

NewProvider allows the creation of a custom IBM IAM Provider Parameters:

Provider Name
AWS Config
API Key
IBM IAM Authentication Server Endpoint
Service Instance ID
Token Manager client

Returns:

Provider

func NewSharedConfigProvider

func NewSharedConfigProvider(config *aws.Config, filename, profilename string) *Provider

NewSharedConfigProvider constructor of the IBM IAM provider that loads IAM Credentials from shared config Parameters:

AWS Config
Profile filename
Profile name

Returns:

Common Ini Provider with values

func NewSharedCredentialsProvider

func NewSharedCredentialsProvider(config *aws.Config, filename, profilename string) *Provider

NewSharedCredentialsProvider constructor of the IBM IAM provider that loads IAM credentials from shared credentials file Parameters:

AWS Config
Profile filename
Profile prefix

Returns:

Common initial provider with config file/profile

func NewStaticProvider

func NewStaticProvider(config *aws.Config, authEndPoint, apiKey, serviceInstanceID string) *Provider

NewStaticProvider constructor of the IBM IAM provider that uses IAM details passed directly Returns: New Provider (AWS type)

func (*Provider) IsExpired

func (p *Provider) IsExpired() bool

IsExpired ...

Provider expired or not - boolean

func (*Provider) IsValid

func (p *Provider) IsValid() bool

IsValid ... Returns:

Provider validation - boolean

func (*Provider) Retrieve

func (p *Provider) Retrieve() (credentials.Value, error)

Retrieve ... Returns:

Credential values
Error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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