Documentation ¶
Index ¶
- Constants
- Variables
- func GetClient[T any](region *string, list map[string]T) (T, error)
- func GetDefaultClient[T any](list map[string]T) (T, error)
- func InitializeAWSConfig(cfg libbeataws.ConfigAWS) (*aws.Config, error)
- func MultiRegionFetch[T any, K any](ctx context.Context, set map[string]T, ...) ([]K, error)
- type AccountProvider
- type AccountProviderAPI
- type AwsResource
- type CrossRegionFactory
- type CrossRegionFetcher
- type EKSClusterNameProvider
- type EKSClusterNameProviderAPI
- type Ec2Metadata
- type Ec2MetadataProvider
- type IdentityProvider
- type IdentityProviderGetter
- type MetadataProvider
- type MockAccountProviderAPI
- type MockAccountProviderAPI_Expecter
- type MockAccountProviderAPI_ListAccounts_Call
- func (_c *MockAccountProviderAPI_ListAccounts_Call) Return(_a0 []cloud.Identity, _a1 error) *MockAccountProviderAPI_ListAccounts_Call
- func (_c *MockAccountProviderAPI_ListAccounts_Call) Run(run func(ctx context.Context, log *logp.Logger, cfg aws.Config)) *MockAccountProviderAPI_ListAccounts_Call
- func (_c *MockAccountProviderAPI_ListAccounts_Call) RunAndReturn(run func(context.Context, *logp.Logger, aws.Config) ([]cloud.Identity, error)) *MockAccountProviderAPI_ListAccounts_Call
- type MockAwsResource
- type MockAwsResource_Expecter
- func (_e *MockAwsResource_Expecter) GetRegion() *MockAwsResource_GetRegion_Call
- func (_e *MockAwsResource_Expecter) GetResourceArn() *MockAwsResource_GetResourceArn_Call
- func (_e *MockAwsResource_Expecter) GetResourceName() *MockAwsResource_GetResourceName_Call
- func (_e *MockAwsResource_Expecter) GetResourceType() *MockAwsResource_GetResourceType_Call
- type MockAwsResource_GetRegion_Call
- type MockAwsResource_GetResourceArn_Call
- func (_c *MockAwsResource_GetResourceArn_Call) Return(_a0 string) *MockAwsResource_GetResourceArn_Call
- func (_c *MockAwsResource_GetResourceArn_Call) Run(run func()) *MockAwsResource_GetResourceArn_Call
- func (_c *MockAwsResource_GetResourceArn_Call) RunAndReturn(run func() string) *MockAwsResource_GetResourceArn_Call
- type MockAwsResource_GetResourceName_Call
- func (_c *MockAwsResource_GetResourceName_Call) Return(_a0 string) *MockAwsResource_GetResourceName_Call
- func (_c *MockAwsResource_GetResourceName_Call) Run(run func()) *MockAwsResource_GetResourceName_Call
- func (_c *MockAwsResource_GetResourceName_Call) RunAndReturn(run func() string) *MockAwsResource_GetResourceName_Call
- type MockAwsResource_GetResourceType_Call
- func (_c *MockAwsResource_GetResourceType_Call) Return(_a0 string) *MockAwsResource_GetResourceType_Call
- func (_c *MockAwsResource_GetResourceType_Call) Run(run func()) *MockAwsResource_GetResourceType_Call
- func (_c *MockAwsResource_GetResourceType_Call) RunAndReturn(run func() string) *MockAwsResource_GetResourceType_Call
- type MockCrossRegionFactory
- type MockCrossRegionFactory_Expecter
- type MockCrossRegionFactory_NewMultiRegionClients_Call
- func (_c *MockCrossRegionFactory_NewMultiRegionClients_Call[T]) Return(_a0 CrossRegionFetcher[T]) *MockCrossRegionFactory_NewMultiRegionClients_Call[T]
- func (_c *MockCrossRegionFactory_NewMultiRegionClients_Call[T]) Run(run func(ctx context.Context, selector RegionsSelector, cfg aws.Config, ...)) *MockCrossRegionFactory_NewMultiRegionClients_Call[T]
- func (_c *MockCrossRegionFactory_NewMultiRegionClients_Call[T]) RunAndReturn(...) *MockCrossRegionFactory_NewMultiRegionClients_Call[T]
- type MockCrossRegionFetcher
- type MockCrossRegionFetcher_Expecter
- type MockCrossRegionFetcher_GetMultiRegionsClientMap_Call
- func (_c *MockCrossRegionFetcher_GetMultiRegionsClientMap_Call[T]) Return(_a0 map[string]T) *MockCrossRegionFetcher_GetMultiRegionsClientMap_Call[T]
- func (_c *MockCrossRegionFetcher_GetMultiRegionsClientMap_Call[T]) Run(run func()) *MockCrossRegionFetcher_GetMultiRegionsClientMap_Call[T]
- func (_c *MockCrossRegionFetcher_GetMultiRegionsClientMap_Call[T]) RunAndReturn(run func() map[string]T) *MockCrossRegionFetcher_GetMultiRegionsClientMap_Call[T]
- type MockEKSClusterNameProviderAPI
- type MockEKSClusterNameProviderAPI_Expecter
- type MockEKSClusterNameProviderAPI_GetClusterName_Call
- func (_c *MockEKSClusterNameProviderAPI_GetClusterName_Call) Return(_a0 string, _a1 error) *MockEKSClusterNameProviderAPI_GetClusterName_Call
- func (_c *MockEKSClusterNameProviderAPI_GetClusterName_Call) Run(run func(ctx context.Context, cfg aws.Config, instanceId string)) *MockEKSClusterNameProviderAPI_GetClusterName_Call
- func (_c *MockEKSClusterNameProviderAPI_GetClusterName_Call) RunAndReturn(run func(context.Context, aws.Config, string) (string, error)) *MockEKSClusterNameProviderAPI_GetClusterName_Call
- type MockIdentityProviderGetter
- type MockIdentityProviderGetter_Expecter
- type MockIdentityProviderGetter_GetIdentity_Call
- func (_c *MockIdentityProviderGetter_GetIdentity_Call) Return(_a0 *cloud.Identity, _a1 error) *MockIdentityProviderGetter_GetIdentity_Call
- func (_c *MockIdentityProviderGetter_GetIdentity_Call) Run(run func(ctx context.Context, cfg aws.Config)) *MockIdentityProviderGetter_GetIdentity_Call
- func (_c *MockIdentityProviderGetter_GetIdentity_Call) RunAndReturn(run func(context.Context, aws.Config) (*cloud.Identity, error)) *MockIdentityProviderGetter_GetIdentity_Call
- type MockMetadataProvider
- type MockMetadataProvider_Expecter
- type MockMetadataProvider_GetMetadata_Call
- func (_c *MockMetadataProvider_GetMetadata_Call) Return(_a0 *imds.InstanceIdentityDocument, _a1 error) *MockMetadataProvider_GetMetadata_Call
- func (_c *MockMetadataProvider_GetMetadata_Call) Run(run func(ctx context.Context, cfg aws.Config)) *MockMetadataProvider_GetMetadata_Call
- func (_c *MockMetadataProvider_GetMetadata_Call) RunAndReturn(run func(context.Context, aws.Config) (*imds.InstanceIdentityDocument, error)) *MockMetadataProvider_GetMetadata_Call
- type MockRegionsSelector
- type MockRegionsSelector_Expecter
- type MockRegionsSelector_Regions_Call
- func (_c *MockRegionsSelector_Regions_Call) Return(_a0 []string, _a1 error) *MockRegionsSelector_Regions_Call
- func (_c *MockRegionsSelector_Regions_Call) Run(run func(ctx context.Context, cfg aws.Config)) *MockRegionsSelector_Regions_Call
- func (_c *MockRegionsSelector_Regions_Call) RunAndReturn(run func(context.Context, aws.Config) ([]string, error)) *MockRegionsSelector_Regions_Call
- type MultiRegionClientFactory
- type RegionsSelector
Constants ¶
const ( DefaultRegion = "us-east-1" DefaultGovRegion = "us-gov-east-1" GlobalRegion = "global" )
Variables ¶
var ErrClientNotFound = errors.New("aws client not found")
Functions ¶
func GetDefaultClient ¶
func InitializeAWSConfig ¶
func InitializeAWSConfig(cfg libbeataws.ConfigAWS) (*aws.Config, error)
Types ¶
type AccountProvider ¶
type AccountProvider struct{}
type AccountProviderAPI ¶
type AwsResource ¶
type CrossRegionFactory ¶
type CrossRegionFetcher ¶
type EKSClusterNameProvider ¶
type EKSClusterNameProvider struct{}
func (EKSClusterNameProvider) GetClusterName ¶
type Ec2Metadata ¶
type Ec2Metadata = ec2imds.InstanceIdentityDocument
type Ec2MetadataProvider ¶
type Ec2MetadataProvider struct{}
func (Ec2MetadataProvider) GetMetadata ¶
func (provider Ec2MetadataProvider) GetMetadata(ctx context.Context, cfg aws.Config) (*Ec2Metadata, error)
type IdentityProvider ¶
func (IdentityProvider) GetIdentity ¶
GetIdentity returns AWS identity information
type IdentityProviderGetter ¶
type MetadataProvider ¶
type MockAccountProviderAPI ¶
MockAccountProviderAPI is an autogenerated mock type for the AccountProviderAPI type
func NewMockAccountProviderAPI ¶
func NewMockAccountProviderAPI(t interface { mock.TestingT Cleanup(func()) }) *MockAccountProviderAPI
NewMockAccountProviderAPI creates a new instance of MockAccountProviderAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockAccountProviderAPI) EXPECT ¶
func (_m *MockAccountProviderAPI) EXPECT() *MockAccountProviderAPI_Expecter
type MockAccountProviderAPI_Expecter ¶
type MockAccountProviderAPI_Expecter struct {
// contains filtered or unexported fields
}
func (*MockAccountProviderAPI_Expecter) ListAccounts ¶
func (_e *MockAccountProviderAPI_Expecter) ListAccounts(ctx interface{}, log interface{}, cfg interface{}) *MockAccountProviderAPI_ListAccounts_Call
ListAccounts is a helper method to define mock.On call
- ctx context.Context
- log *logp.Logger
- cfg aws.Config
type MockAccountProviderAPI_ListAccounts_Call ¶
MockAccountProviderAPI_ListAccounts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAccounts'
func (*MockAccountProviderAPI_ListAccounts_Call) Return ¶
func (_c *MockAccountProviderAPI_ListAccounts_Call) Return(_a0 []cloud.Identity, _a1 error) *MockAccountProviderAPI_ListAccounts_Call
func (*MockAccountProviderAPI_ListAccounts_Call) Run ¶
func (_c *MockAccountProviderAPI_ListAccounts_Call) Run(run func(ctx context.Context, log *logp.Logger, cfg aws.Config)) *MockAccountProviderAPI_ListAccounts_Call
func (*MockAccountProviderAPI_ListAccounts_Call) RunAndReturn ¶
type MockAwsResource ¶
MockAwsResource is an autogenerated mock type for the AwsResource type
func NewMockAwsResource ¶
func NewMockAwsResource(t interface { mock.TestingT Cleanup(func()) }) *MockAwsResource
NewMockAwsResource creates a new instance of MockAwsResource. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockAwsResource) EXPECT ¶
func (_m *MockAwsResource) EXPECT() *MockAwsResource_Expecter
func (*MockAwsResource) GetRegion ¶
func (_m *MockAwsResource) GetRegion() string
GetRegion provides a mock function with given fields:
func (*MockAwsResource) GetResourceArn ¶
func (_m *MockAwsResource) GetResourceArn() string
GetResourceArn provides a mock function with given fields:
func (*MockAwsResource) GetResourceName ¶
func (_m *MockAwsResource) GetResourceName() string
GetResourceName provides a mock function with given fields:
func (*MockAwsResource) GetResourceType ¶
func (_m *MockAwsResource) GetResourceType() string
GetResourceType provides a mock function with given fields:
type MockAwsResource_Expecter ¶
type MockAwsResource_Expecter struct {
// contains filtered or unexported fields
}
func (*MockAwsResource_Expecter) GetRegion ¶
func (_e *MockAwsResource_Expecter) GetRegion() *MockAwsResource_GetRegion_Call
GetRegion is a helper method to define mock.On call
func (*MockAwsResource_Expecter) GetResourceArn ¶
func (_e *MockAwsResource_Expecter) GetResourceArn() *MockAwsResource_GetResourceArn_Call
GetResourceArn is a helper method to define mock.On call
func (*MockAwsResource_Expecter) GetResourceName ¶
func (_e *MockAwsResource_Expecter) GetResourceName() *MockAwsResource_GetResourceName_Call
GetResourceName is a helper method to define mock.On call
func (*MockAwsResource_Expecter) GetResourceType ¶
func (_e *MockAwsResource_Expecter) GetResourceType() *MockAwsResource_GetResourceType_Call
GetResourceType is a helper method to define mock.On call
type MockAwsResource_GetRegion_Call ¶
MockAwsResource_GetRegion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRegion'
func (*MockAwsResource_GetRegion_Call) Return ¶
func (_c *MockAwsResource_GetRegion_Call) Return(_a0 string) *MockAwsResource_GetRegion_Call
func (*MockAwsResource_GetRegion_Call) Run ¶
func (_c *MockAwsResource_GetRegion_Call) Run(run func()) *MockAwsResource_GetRegion_Call
func (*MockAwsResource_GetRegion_Call) RunAndReturn ¶
func (_c *MockAwsResource_GetRegion_Call) RunAndReturn(run func() string) *MockAwsResource_GetRegion_Call
type MockAwsResource_GetResourceArn_Call ¶
MockAwsResource_GetResourceArn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetResourceArn'
func (*MockAwsResource_GetResourceArn_Call) Return ¶
func (_c *MockAwsResource_GetResourceArn_Call) Return(_a0 string) *MockAwsResource_GetResourceArn_Call
func (*MockAwsResource_GetResourceArn_Call) Run ¶
func (_c *MockAwsResource_GetResourceArn_Call) Run(run func()) *MockAwsResource_GetResourceArn_Call
func (*MockAwsResource_GetResourceArn_Call) RunAndReturn ¶
func (_c *MockAwsResource_GetResourceArn_Call) RunAndReturn(run func() string) *MockAwsResource_GetResourceArn_Call
type MockAwsResource_GetResourceName_Call ¶
MockAwsResource_GetResourceName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetResourceName'
func (*MockAwsResource_GetResourceName_Call) Return ¶
func (_c *MockAwsResource_GetResourceName_Call) Return(_a0 string) *MockAwsResource_GetResourceName_Call
func (*MockAwsResource_GetResourceName_Call) Run ¶
func (_c *MockAwsResource_GetResourceName_Call) Run(run func()) *MockAwsResource_GetResourceName_Call
func (*MockAwsResource_GetResourceName_Call) RunAndReturn ¶
func (_c *MockAwsResource_GetResourceName_Call) RunAndReturn(run func() string) *MockAwsResource_GetResourceName_Call
type MockAwsResource_GetResourceType_Call ¶
MockAwsResource_GetResourceType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetResourceType'
func (*MockAwsResource_GetResourceType_Call) Return ¶
func (_c *MockAwsResource_GetResourceType_Call) Return(_a0 string) *MockAwsResource_GetResourceType_Call
func (*MockAwsResource_GetResourceType_Call) Run ¶
func (_c *MockAwsResource_GetResourceType_Call) Run(run func()) *MockAwsResource_GetResourceType_Call
func (*MockAwsResource_GetResourceType_Call) RunAndReturn ¶
func (_c *MockAwsResource_GetResourceType_Call) RunAndReturn(run func() string) *MockAwsResource_GetResourceType_Call
type MockCrossRegionFactory ¶
MockCrossRegionFactory is an autogenerated mock type for the CrossRegionFactory type
func NewMockCrossRegionFactory ¶
func NewMockCrossRegionFactory[T interface{}](t interface { mock.TestingT Cleanup(func()) }) *MockCrossRegionFactory[T]
NewMockCrossRegionFactory creates a new instance of MockCrossRegionFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockCrossRegionFactory[T]) EXPECT ¶
func (_m *MockCrossRegionFactory[T]) EXPECT() *MockCrossRegionFactory_Expecter[T]
func (*MockCrossRegionFactory[T]) NewMultiRegionClients ¶
func (_m *MockCrossRegionFactory[T]) NewMultiRegionClients(ctx context.Context, selector RegionsSelector, cfg aws.Config, factory func(aws.Config) T, log *logp.Logger) CrossRegionFetcher[T]
NewMultiRegionClients provides a mock function with given fields: ctx, selector, cfg, factory, log
type MockCrossRegionFactory_Expecter ¶
type MockCrossRegionFactory_Expecter[T interface{}] struct {
// contains filtered or unexported fields
}
func (*MockCrossRegionFactory_Expecter[T]) NewMultiRegionClients ¶
func (_e *MockCrossRegionFactory_Expecter[T]) NewMultiRegionClients(ctx interface{}, selector interface{}, cfg interface{}, factory interface{}, log interface{}) *MockCrossRegionFactory_NewMultiRegionClients_Call[T]
NewMultiRegionClients is a helper method to define mock.On call
- ctx context.Context
- selector RegionsSelector
- cfg aws.Config
- factory func(aws.Config) T
- log *logp.Logger
type MockCrossRegionFactory_NewMultiRegionClients_Call ¶
MockCrossRegionFactory_NewMultiRegionClients_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewMultiRegionClients'
func (*MockCrossRegionFactory_NewMultiRegionClients_Call[T]) Return ¶
func (_c *MockCrossRegionFactory_NewMultiRegionClients_Call[T]) Return(_a0 CrossRegionFetcher[T]) *MockCrossRegionFactory_NewMultiRegionClients_Call[T]
func (*MockCrossRegionFactory_NewMultiRegionClients_Call[T]) Run ¶
func (_c *MockCrossRegionFactory_NewMultiRegionClients_Call[T]) Run(run func(ctx context.Context, selector RegionsSelector, cfg aws.Config, factory func(aws.Config) T, log *logp.Logger)) *MockCrossRegionFactory_NewMultiRegionClients_Call[T]
func (*MockCrossRegionFactory_NewMultiRegionClients_Call[T]) RunAndReturn ¶
func (_c *MockCrossRegionFactory_NewMultiRegionClients_Call[T]) RunAndReturn(run func(context.Context, RegionsSelector, aws.Config, func(aws.Config) T, *logp.Logger) CrossRegionFetcher[T]) *MockCrossRegionFactory_NewMultiRegionClients_Call[T]
type MockCrossRegionFetcher ¶
MockCrossRegionFetcher is an autogenerated mock type for the CrossRegionFetcher type
func NewMockCrossRegionFetcher ¶
func NewMockCrossRegionFetcher[T interface{}](t interface { mock.TestingT Cleanup(func()) }) *MockCrossRegionFetcher[T]
NewMockCrossRegionFetcher creates a new instance of MockCrossRegionFetcher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockCrossRegionFetcher[T]) EXPECT ¶
func (_m *MockCrossRegionFetcher[T]) EXPECT() *MockCrossRegionFetcher_Expecter[T]
func (*MockCrossRegionFetcher[T]) GetMultiRegionsClientMap ¶
func (_m *MockCrossRegionFetcher[T]) GetMultiRegionsClientMap() map[string]T
GetMultiRegionsClientMap provides a mock function with given fields:
type MockCrossRegionFetcher_Expecter ¶
type MockCrossRegionFetcher_Expecter[T interface{}] struct {
// contains filtered or unexported fields
}
func (*MockCrossRegionFetcher_Expecter[T]) GetMultiRegionsClientMap ¶
func (_e *MockCrossRegionFetcher_Expecter[T]) GetMultiRegionsClientMap() *MockCrossRegionFetcher_GetMultiRegionsClientMap_Call[T]
GetMultiRegionsClientMap is a helper method to define mock.On call
type MockCrossRegionFetcher_GetMultiRegionsClientMap_Call ¶
MockCrossRegionFetcher_GetMultiRegionsClientMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMultiRegionsClientMap'
func (*MockCrossRegionFetcher_GetMultiRegionsClientMap_Call[T]) Return ¶
func (_c *MockCrossRegionFetcher_GetMultiRegionsClientMap_Call[T]) Return(_a0 map[string]T) *MockCrossRegionFetcher_GetMultiRegionsClientMap_Call[T]
func (*MockCrossRegionFetcher_GetMultiRegionsClientMap_Call[T]) Run ¶
func (_c *MockCrossRegionFetcher_GetMultiRegionsClientMap_Call[T]) Run(run func()) *MockCrossRegionFetcher_GetMultiRegionsClientMap_Call[T]
func (*MockCrossRegionFetcher_GetMultiRegionsClientMap_Call[T]) RunAndReturn ¶
func (_c *MockCrossRegionFetcher_GetMultiRegionsClientMap_Call[T]) RunAndReturn(run func() map[string]T) *MockCrossRegionFetcher_GetMultiRegionsClientMap_Call[T]
type MockEKSClusterNameProviderAPI ¶
MockEKSClusterNameProviderAPI is an autogenerated mock type for the EKSClusterNameProviderAPI type
func NewMockEKSClusterNameProviderAPI ¶
func NewMockEKSClusterNameProviderAPI(t interface { mock.TestingT Cleanup(func()) }) *MockEKSClusterNameProviderAPI
NewMockEKSClusterNameProviderAPI creates a new instance of MockEKSClusterNameProviderAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockEKSClusterNameProviderAPI) EXPECT ¶
func (_m *MockEKSClusterNameProviderAPI) EXPECT() *MockEKSClusterNameProviderAPI_Expecter
func (*MockEKSClusterNameProviderAPI) GetClusterName ¶
func (_m *MockEKSClusterNameProviderAPI) GetClusterName(ctx context.Context, cfg aws.Config, instanceId string) (string, error)
GetClusterName provides a mock function with given fields: ctx, cfg, instanceId
type MockEKSClusterNameProviderAPI_Expecter ¶
type MockEKSClusterNameProviderAPI_Expecter struct {
// contains filtered or unexported fields
}
func (*MockEKSClusterNameProviderAPI_Expecter) GetClusterName ¶
func (_e *MockEKSClusterNameProviderAPI_Expecter) GetClusterName(ctx interface{}, cfg interface{}, instanceId interface{}) *MockEKSClusterNameProviderAPI_GetClusterName_Call
GetClusterName is a helper method to define mock.On call
- ctx context.Context
- cfg aws.Config
- instanceId string
type MockEKSClusterNameProviderAPI_GetClusterName_Call ¶
MockEKSClusterNameProviderAPI_GetClusterName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClusterName'
func (*MockEKSClusterNameProviderAPI_GetClusterName_Call) Return ¶
func (_c *MockEKSClusterNameProviderAPI_GetClusterName_Call) Return(_a0 string, _a1 error) *MockEKSClusterNameProviderAPI_GetClusterName_Call
func (*MockEKSClusterNameProviderAPI_GetClusterName_Call) Run ¶
func (_c *MockEKSClusterNameProviderAPI_GetClusterName_Call) Run(run func(ctx context.Context, cfg aws.Config, instanceId string)) *MockEKSClusterNameProviderAPI_GetClusterName_Call
func (*MockEKSClusterNameProviderAPI_GetClusterName_Call) RunAndReturn ¶
func (_c *MockEKSClusterNameProviderAPI_GetClusterName_Call) RunAndReturn(run func(context.Context, aws.Config, string) (string, error)) *MockEKSClusterNameProviderAPI_GetClusterName_Call
type MockIdentityProviderGetter ¶
MockIdentityProviderGetter is an autogenerated mock type for the IdentityProviderGetter type
func NewMockIdentityProviderGetter ¶
func NewMockIdentityProviderGetter(t interface { mock.TestingT Cleanup(func()) }) *MockIdentityProviderGetter
NewMockIdentityProviderGetter creates a new instance of MockIdentityProviderGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockIdentityProviderGetter) EXPECT ¶
func (_m *MockIdentityProviderGetter) EXPECT() *MockIdentityProviderGetter_Expecter
func (*MockIdentityProviderGetter) GetIdentity ¶
func (_m *MockIdentityProviderGetter) GetIdentity(ctx context.Context, cfg aws.Config) (*cloud.Identity, error)
GetIdentity provides a mock function with given fields: ctx, cfg
type MockIdentityProviderGetter_Expecter ¶
type MockIdentityProviderGetter_Expecter struct {
// contains filtered or unexported fields
}
func (*MockIdentityProviderGetter_Expecter) GetIdentity ¶
func (_e *MockIdentityProviderGetter_Expecter) GetIdentity(ctx interface{}, cfg interface{}) *MockIdentityProviderGetter_GetIdentity_Call
GetIdentity is a helper method to define mock.On call
- ctx context.Context
- cfg aws.Config
type MockIdentityProviderGetter_GetIdentity_Call ¶
MockIdentityProviderGetter_GetIdentity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIdentity'
func (*MockIdentityProviderGetter_GetIdentity_Call) Return ¶
func (_c *MockIdentityProviderGetter_GetIdentity_Call) Return(_a0 *cloud.Identity, _a1 error) *MockIdentityProviderGetter_GetIdentity_Call
func (*MockIdentityProviderGetter_GetIdentity_Call) Run ¶
func (_c *MockIdentityProviderGetter_GetIdentity_Call) Run(run func(ctx context.Context, cfg aws.Config)) *MockIdentityProviderGetter_GetIdentity_Call
func (*MockIdentityProviderGetter_GetIdentity_Call) RunAndReturn ¶
func (_c *MockIdentityProviderGetter_GetIdentity_Call) RunAndReturn(run func(context.Context, aws.Config) (*cloud.Identity, error)) *MockIdentityProviderGetter_GetIdentity_Call
type MockMetadataProvider ¶
MockMetadataProvider is an autogenerated mock type for the MetadataProvider type
func NewMockMetadataProvider ¶
func NewMockMetadataProvider(t interface { mock.TestingT Cleanup(func()) }) *MockMetadataProvider
NewMockMetadataProvider creates a new instance of MockMetadataProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockMetadataProvider) EXPECT ¶
func (_m *MockMetadataProvider) EXPECT() *MockMetadataProvider_Expecter
func (*MockMetadataProvider) GetMetadata ¶
func (_m *MockMetadataProvider) GetMetadata(ctx context.Context, cfg aws.Config) (*imds.InstanceIdentityDocument, error)
GetMetadata provides a mock function with given fields: ctx, cfg
type MockMetadataProvider_Expecter ¶
type MockMetadataProvider_Expecter struct {
// contains filtered or unexported fields
}
func (*MockMetadataProvider_Expecter) GetMetadata ¶
func (_e *MockMetadataProvider_Expecter) GetMetadata(ctx interface{}, cfg interface{}) *MockMetadataProvider_GetMetadata_Call
GetMetadata is a helper method to define mock.On call
- ctx context.Context
- cfg aws.Config
type MockMetadataProvider_GetMetadata_Call ¶
MockMetadataProvider_GetMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMetadata'
func (*MockMetadataProvider_GetMetadata_Call) Return ¶
func (_c *MockMetadataProvider_GetMetadata_Call) Return(_a0 *imds.InstanceIdentityDocument, _a1 error) *MockMetadataProvider_GetMetadata_Call
func (*MockMetadataProvider_GetMetadata_Call) Run ¶
func (_c *MockMetadataProvider_GetMetadata_Call) Run(run func(ctx context.Context, cfg aws.Config)) *MockMetadataProvider_GetMetadata_Call
func (*MockMetadataProvider_GetMetadata_Call) RunAndReturn ¶
func (_c *MockMetadataProvider_GetMetadata_Call) RunAndReturn(run func(context.Context, aws.Config) (*imds.InstanceIdentityDocument, error)) *MockMetadataProvider_GetMetadata_Call
type MockRegionsSelector ¶
MockRegionsSelector is an autogenerated mock type for the RegionsSelector type
func NewMockRegionsSelector ¶
func NewMockRegionsSelector(t interface { mock.TestingT Cleanup(func()) }) *MockRegionsSelector
NewMockRegionsSelector creates a new instance of MockRegionsSelector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockRegionsSelector) EXPECT ¶
func (_m *MockRegionsSelector) EXPECT() *MockRegionsSelector_Expecter
type MockRegionsSelector_Expecter ¶
type MockRegionsSelector_Expecter struct {
// contains filtered or unexported fields
}
func (*MockRegionsSelector_Expecter) Regions ¶
func (_e *MockRegionsSelector_Expecter) Regions(ctx interface{}, cfg interface{}) *MockRegionsSelector_Regions_Call
Regions is a helper method to define mock.On call
- ctx context.Context
- cfg aws.Config
type MockRegionsSelector_Regions_Call ¶
MockRegionsSelector_Regions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Regions'
func (*MockRegionsSelector_Regions_Call) Return ¶
func (_c *MockRegionsSelector_Regions_Call) Return(_a0 []string, _a1 error) *MockRegionsSelector_Regions_Call
func (*MockRegionsSelector_Regions_Call) Run ¶
func (_c *MockRegionsSelector_Regions_Call) Run(run func(ctx context.Context, cfg aws.Config)) *MockRegionsSelector_Regions_Call
func (*MockRegionsSelector_Regions_Call) RunAndReturn ¶
func (_c *MockRegionsSelector_Regions_Call) RunAndReturn(run func(context.Context, aws.Config) ([]string, error)) *MockRegionsSelector_Regions_Call
type MultiRegionClientFactory ¶
type MultiRegionClientFactory[T any] struct{}
func (*MultiRegionClientFactory[T]) NewMultiRegionClients ¶
func (w *MultiRegionClientFactory[T]) NewMultiRegionClients(ctx context.Context, selector RegionsSelector, cfg aws.Config, factory func(cfg aws.Config) T, log *logp.Logger) CrossRegionFetcher[T]
NewMultiRegionClients is a utility function that is used to create a map of client instances of a given type T for multiple regions.
type RegionsSelector ¶
func AllRegionSelector ¶
func AllRegionSelector() RegionsSelector
func CurrentRegionSelector ¶
func CurrentRegionSelector() RegionsSelector
Source Files ¶
- account_provider.go
- all_region_selector.go
- aws.go
- cached_region_selector.go
- cluster_name_provider.go
- config.go
- current_region_selector.go
- ec2_metadata_provider.go
- identity_provider.go
- mock_account_provider_api.go
- mock_aws_resource.go
- mock_cross_region_factory.go
- mock_cross_region_fetcher.go
- mock_describe_cloud_regions.go
- mock_eks_cluster_name_provider_api.go
- mock_identity_provider_getter.go
- mock_metadata_provider.go
- mock_organizations_api.go
- mock_regions_selector.go
- multi_region.go