organization

package
v1.208.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

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.

func SetGetter

func SetGetter(g Getter) func()

SetGetter allows tests to inject a mock Getter. Returns a function to restore the original getter.

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

DescribeOrganization mocks base method.

func (*MockorganizationsAPI) EXPECT

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.

Jump to

Keyboard shortcuts

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