Documentation ¶
Index ¶
- type Config
- type IAM
- type IAMClient
- func (c *IAMClient) FolderIAM(ctx context.Context, folderID string) ([]*assetinventory.AssetIAM, error)
- func (c *IAMClient) OrganizationIAM(ctx context.Context, organizationID string) ([]*assetinventory.AssetIAM, error)
- func (c *IAMClient) ProjectIAM(ctx context.Context, projectID string) ([]*assetinventory.AssetIAM, error)
- func (c *IAMClient) RemoveFolderIAM(ctx context.Context, iamMember *assetinventory.AssetIAM) error
- func (c *IAMClient) RemoveOrganizationIAM(ctx context.Context, iamMember *assetinventory.AssetIAM) error
- func (c *IAMClient) RemoveProjectIAM(ctx context.Context, iamMember *assetinventory.AssetIAM) error
- type MockIAMClient
- func (m *MockIAMClient) FolderIAM(ctx context.Context, folderID string) ([]*assetinventory.AssetIAM, error)
- func (m *MockIAMClient) OrganizationIAM(ctx context.Context, organizationID string) ([]*assetinventory.AssetIAM, error)
- func (m *MockIAMClient) ProjectIAM(ctx context.Context, projectID string) ([]*assetinventory.AssetIAM, error)
- func (m *MockIAMClient) RemoveFolderIAM(ctx context.Context, iamMember *assetinventory.AssetIAM) error
- func (m *MockIAMClient) RemoveOrganizationIAM(ctx context.Context, iamMember *assetinventory.AssetIAM) error
- func (m *MockIAMClient) RemoveProjectIAM(ctx context.Context, iamMember *assetinventory.AssetIAM) error
- type Option
- type Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is the config values for the IAM client.
type IAM ¶
type IAM interface { // OrganizationIAM returns the IAM set on the Organization. OrganizationIAM(ctx context.Context, organizationID string) ([]*assetinventory.AssetIAM, error) // FolderIAM returns the IAM set on the Folder. FolderIAM(ctx context.Context, folderID string) ([]*assetinventory.AssetIAM, error) // ProjectIAM returns the IAM set on the Project. ProjectIAM(ctx context.Context, projectID string) ([]*assetinventory.AssetIAM, error) // RemoveOrganizationIAM removes the given IAM policy membership. RemoveOrganizationIAM(ctx context.Context, projectIAMMember *assetinventory.AssetIAM) error // RemoveFolderIAM removes the given IAM policy membership. RemoveFolderIAM(ctx context.Context, projectIAMMember *assetinventory.AssetIAM) error // RemoveProjectIAM removes the given IAM policy membership. RemoveProjectIAM(ctx context.Context, projectIAMMember *assetinventory.AssetIAM) error }
IAM defines the common gcp iam functionality.
type IAMClient ¶
type IAMClient struct {
// contains filtered or unexported fields
}
IAMClient exposes GCP IAM functionality.
func (*IAMClient) FolderIAM ¶
func (c *IAMClient) FolderIAM(ctx context.Context, folderID string) ([]*assetinventory.AssetIAM, error)
FolderIAM returns all IAM memberships, bindings, and policies for the given folder.
func (*IAMClient) OrganizationIAM ¶
func (c *IAMClient) OrganizationIAM(ctx context.Context, organizationID string) ([]*assetinventory.AssetIAM, error)
OrganizationIAM returns all IAM memberships, bindings, and policies for the given organization.
func (*IAMClient) ProjectIAM ¶
func (c *IAMClient) ProjectIAM(ctx context.Context, projectID string) ([]*assetinventory.AssetIAM, error)
ProjectIAM returns all IAM memberships, bindings, and policies for the given project.
func (*IAMClient) RemoveFolderIAM ¶
RemoveFolderIAM removes the given IAM policy membership.
func (*IAMClient) RemoveOrganizationIAM ¶
func (c *IAMClient) RemoveOrganizationIAM(ctx context.Context, iamMember *assetinventory.AssetIAM) error
RemoveOrganizationIAM removes the given IAM policy membership.
func (*IAMClient) RemoveProjectIAM ¶
RemoveProjectIAM removes the given IAM policy membership.
type MockIAMClient ¶
type MockIAMClient struct { OrgErr error OrgData []*assetinventory.AssetIAM FolderErr error FolderData []*assetinventory.AssetIAM ProjectErr error ProjectData []*assetinventory.AssetIAM RemoveOrgErr error RemoveFolderErr error RemoveProjectErr error }
func (*MockIAMClient) FolderIAM ¶
func (m *MockIAMClient) FolderIAM(ctx context.Context, folderID string) ([]*assetinventory.AssetIAM, error)
func (*MockIAMClient) OrganizationIAM ¶
func (m *MockIAMClient) OrganizationIAM(ctx context.Context, organizationID string) ([]*assetinventory.AssetIAM, error)
func (*MockIAMClient) ProjectIAM ¶
func (m *MockIAMClient) ProjectIAM(ctx context.Context, projectID string) ([]*assetinventory.AssetIAM, error)
func (*MockIAMClient) RemoveFolderIAM ¶
func (m *MockIAMClient) RemoveFolderIAM(ctx context.Context, iamMember *assetinventory.AssetIAM) error
func (*MockIAMClient) RemoveOrganizationIAM ¶
func (m *MockIAMClient) RemoveOrganizationIAM(ctx context.Context, iamMember *assetinventory.AssetIAM) error
func (*MockIAMClient) RemoveProjectIAM ¶
func (m *MockIAMClient) RemoveProjectIAM(ctx context.Context, iamMember *assetinventory.AssetIAM) error
type Option ¶
Option is an optional config value for the IAMClient.
func WithRetryInitialDelay ¶
WithRetryInitialDelay configures the initial delay time before sending a retry for the IAM Client.
func WithRetryMaxAttempts ¶
WithRetryMaxAttempts configures the maximum number of retry attempts for the IAM Client.
func WithRetryMaxDelay ¶
WithRetryMaxDelay configures the maximum delay time before sending a retry for the IAM Client.