Documentation
¶
Overview ¶
Package organization is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearOrganizationCache ¶
func ClearOrganizationCache()
ClearOrganizationCache clears the AWS organization cache. This is useful in tests or when credentials change during execution.
Types ¶
type Getter ¶
type Getter interface {
// GetOrganization retrieves the AWS organization info for the current account.
// Returns the organization ID, ARN, master account ID, and master account email.
GetOrganization(
ctx context.Context,
atmosConfig *schema.AtmosConfiguration,
authContext *schema.AWSAuthContext,
) (*OrganizationInfo, error)
}
Getter provides an interface for retrieving AWS organization information. This interface enables dependency injection and testability.
type MockGetter ¶
type MockGetter struct {
// contains filtered or unexported fields
}
MockGetter is a mock of Getter interface.
func NewMockGetter ¶
func NewMockGetter(ctrl *gomock.Controller) *MockGetter
NewMockGetter creates a new mock instance.
func (*MockGetter) EXPECT ¶
func (m *MockGetter) EXPECT() *MockGetterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockGetter) GetOrganization ¶
func (m *MockGetter) GetOrganization(ctx context.Context, atmosConfig *schema.AtmosConfiguration, authContext *schema.AWSAuthContext) (*OrganizationInfo, error)
GetOrganization mocks base method.
type MockGetterMockRecorder ¶
type MockGetterMockRecorder struct {
// contains filtered or unexported fields
}
MockGetterMockRecorder is the mock recorder for MockGetter.
func (*MockGetterMockRecorder) GetOrganization ¶
func (mr *MockGetterMockRecorder) GetOrganization(ctx, atmosConfig, authContext any) *gomock.Call
GetOrganization indicates an expected call of GetOrganization.
type MockorganizationsAPI ¶
type MockorganizationsAPI struct {
// contains filtered or unexported fields
}
MockorganizationsAPI is a mock of organizationsAPI interface.
func NewMockorganizationsAPI ¶
func NewMockorganizationsAPI(ctrl *gomock.Controller) *MockorganizationsAPI
NewMockorganizationsAPI creates a new mock instance.
func (*MockorganizationsAPI) DescribeOrganization ¶
func (m *MockorganizationsAPI) DescribeOrganization(ctx context.Context, params *organizations.DescribeOrganizationInput, optFns ...func(*organizations.Options)) (*organizations.DescribeOrganizationOutput, error)
DescribeOrganization mocks base method.
func (*MockorganizationsAPI) EXPECT ¶
func (m *MockorganizationsAPI) EXPECT() *MockorganizationsAPIMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockorganizationsAPIMockRecorder ¶
type MockorganizationsAPIMockRecorder struct {
// contains filtered or unexported fields
}
MockorganizationsAPIMockRecorder is the mock recorder for MockorganizationsAPI.
func (*MockorganizationsAPIMockRecorder) DescribeOrganization ¶
func (mr *MockorganizationsAPIMockRecorder) DescribeOrganization(ctx, params any, optFns ...any) *gomock.Call
DescribeOrganization indicates an expected call of DescribeOrganization.
type OrganizationInfo ¶
type OrganizationInfo struct {
ID string
Arn string
MasterAccountID string
MasterAccountEmail string
}
OrganizationInfo holds the information returned by AWS Organizations DescribeOrganization.
func GetOrganizationCached ¶
func GetOrganizationCached( ctx context.Context, atmosConfig *schema.AtmosConfiguration, authContext *schema.AWSAuthContext, ) (*OrganizationInfo, error)
GetOrganizationCached retrieves the AWS organization info with caching. Results are cached per auth context to avoid repeated API calls within the same CLI invocation.