token

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSECRToken

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

AWSECRToken is the interface for the ECR client that generates the authorization token

func NewAWSECRToken

func NewAWSECRToken(options ...OptionsFunc) *AWSECRToken

NewAWSECRToken creates a new ECR client

func (*AWSECRToken) Get

func (token *AWSECRToken) Get(ctx context.Context, AWSConfigFunc func(context.Context, ...func(*config.LoadOptions) error) (aws.Config, error), credential *credentials.Credential) (*ecr.GetAuthorizationTokenOutput, error)

Get return the authorization token

type AssumerRoleARNProviderer

type AssumerRoleARNProviderer interface {
	CredentialsProvider(cfg aws.Config, roleARN, awsAccessKeyID, awsSecretAccessKey, session string, options ...func(*config.LoadOptions) error) (aws.CredentialsProvider, error)
}

AssumerRoleARNProviderer is an interface that provides AssumerRoleARN credendials provider.

type ECRClientFactory

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

func NewECRClientFactory

func NewECRClientFactory(factoryFunc func(aws.Config) ECRClienter) *ECRClientFactory

func (*ECRClientFactory) Client

func (f *ECRClientFactory) Client(cfg aws.Config) ECRClienter

type ECRClienter

type ECRClienter interface {
	GetAuthorizationToken(ctx context.Context, input *ecr.GetAuthorizationTokenInput, options ...func(*ecr.Options)) (*ecr.GetAuthorizationTokenOutput, error)
}

ECRClienter is an interface that provides ECR client.

type MockAWSECRToken

type MockAWSECRToken struct {
	mock.Mock
}

MockAWSECRToken is a mock of AWSECRToken

func NewMockAWSECRToken

func NewMockAWSECRToken() *MockAWSECRToken

NewMockAWSECRToken creates a new mock

func (*MockAWSECRToken) Get

Get is a mock function to get the authorization token

type OptionsFunc

type OptionsFunc func(*AWSECRToken)

func WithAssumeRoleARNProvider

func WithAssumeRoleARNProvider(assumeRoleARNProvider AssumerRoleARNProviderer) OptionsFunc

WithAssumeRoleARNProvider is a function that sets the assume role ARN provider

func WithECRClientFactory

func WithECRClientFactory(ecrClientFactory *ECRClientFactory) OptionsFunc

WithECRClientFactory is a function that sets the ECR client factory

func WithStaticCredentialsProvider

func WithStaticCredentialsProvider(staticCredentialsProviderer StaticCredentialsProviderer) OptionsFunc

WithStaticCredentialsProvider is a function that sets the static credentials provider

type StaticCredentialsProviderer

type StaticCredentialsProviderer interface {
	CredentialsProvider(key, secret, session string, options ...func(*config.LoadOptions) error) (aws.CredentialsProvider, error)
}

StaticCredentialsProvider is an interface that provides static credentials credentials provider.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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