iam

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package iam provides a portable IAM API with cross-cutting concerns.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAM

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

IAM is the portable IAM type wrapping a driver.

func NewIAM

func NewIAM(d driver.IAM, opts ...Option) *IAM

func (*IAM) AddRoleToInstanceProfile

func (i *IAM) AddRoleToInstanceProfile(ctx context.Context, profileName, roleName string) error

func (*IAM) AddUserToGroup

func (i *IAM) AddUserToGroup(ctx context.Context, userName, groupName string) error

func (*IAM) AttachRolePolicy

func (i *IAM) AttachRolePolicy(ctx context.Context, roleName, policyARN string) error

func (*IAM) AttachUserPolicy

func (i *IAM) AttachUserPolicy(ctx context.Context, userName, policyARN string) error

func (*IAM) CheckPermission

func (i *IAM) CheckPermission(ctx context.Context, principal, action, resource string) (bool, error)

func (*IAM) CreateAccessKey

func (i *IAM) CreateAccessKey(ctx context.Context, config driver.AccessKeyConfig) (*driver.AccessKeyInfo, error)

func (*IAM) CreateGroup

func (i *IAM) CreateGroup(ctx context.Context, config driver.GroupConfig) (*driver.GroupInfo, error)

func (*IAM) CreateInstanceProfile

func (i *IAM) CreateInstanceProfile(
	ctx context.Context, config driver.InstanceProfileConfig,
) (*driver.InstanceProfileInfo, error)

func (*IAM) CreatePolicy

func (i *IAM) CreatePolicy(ctx context.Context, config driver.PolicyConfig) (*driver.PolicyInfo, error)

func (*IAM) CreatePolicyVersion

func (i *IAM) CreatePolicyVersion(
	ctx context.Context, config driver.PolicyVersionConfig,
) (*driver.PolicyVersionInfo, error)

func (*IAM) CreateRole

func (i *IAM) CreateRole(ctx context.Context, config driver.RoleConfig) (*driver.RoleInfo, error)

func (*IAM) CreateUser

func (i *IAM) CreateUser(ctx context.Context, config driver.UserConfig) (*driver.UserInfo, error)

func (*IAM) DeleteAccessKey

func (i *IAM) DeleteAccessKey(ctx context.Context, userName, accessKeyID string) error

func (*IAM) DeleteGroup

func (i *IAM) DeleteGroup(ctx context.Context, name string) error

func (*IAM) DeleteInstanceProfile

func (i *IAM) DeleteInstanceProfile(ctx context.Context, name string) error

func (*IAM) DeletePolicy

func (i *IAM) DeletePolicy(ctx context.Context, arn string) error

func (*IAM) DeletePolicyVersion

func (i *IAM) DeletePolicyVersion(ctx context.Context, policyARN, versionID string) error

func (*IAM) DeleteRole

func (i *IAM) DeleteRole(ctx context.Context, name string) error

func (*IAM) DeleteUser

func (i *IAM) DeleteUser(ctx context.Context, name string) error

func (*IAM) DetachRolePolicy

func (i *IAM) DetachRolePolicy(ctx context.Context, roleName, policyARN string) error

func (*IAM) DetachUserPolicy

func (i *IAM) DetachUserPolicy(ctx context.Context, userName, policyARN string) error

func (*IAM) GetGroup

func (i *IAM) GetGroup(ctx context.Context, name string) (*driver.GroupInfo, error)

func (*IAM) GetInstanceProfile

func (i *IAM) GetInstanceProfile(ctx context.Context, name string) (*driver.InstanceProfileInfo, error)

func (*IAM) GetPolicy

func (i *IAM) GetPolicy(ctx context.Context, arn string) (*driver.PolicyInfo, error)

func (*IAM) GetPolicyVersion

func (i *IAM) GetPolicyVersion(ctx context.Context, policyARN, versionID string) (*driver.PolicyVersionInfo, error)

func (*IAM) GetRole

func (i *IAM) GetRole(ctx context.Context, name string) (*driver.RoleInfo, error)

func (*IAM) GetUser

func (i *IAM) GetUser(ctx context.Context, name string) (*driver.UserInfo, error)

func (*IAM) ListAccessKeys

func (i *IAM) ListAccessKeys(ctx context.Context, userName string) ([]driver.AccessKeyInfo, error)

func (*IAM) ListAttachedRolePolicies

func (i *IAM) ListAttachedRolePolicies(ctx context.Context, roleName string) ([]string, error)

func (*IAM) ListAttachedUserPolicies

func (i *IAM) ListAttachedUserPolicies(ctx context.Context, userName string) ([]string, error)

func (*IAM) ListGroups

func (i *IAM) ListGroups(ctx context.Context) ([]driver.GroupInfo, error)

func (*IAM) ListGroupsForUser

func (i *IAM) ListGroupsForUser(ctx context.Context, userName string) ([]driver.GroupInfo, error)

func (*IAM) ListInstanceProfiles

func (i *IAM) ListInstanceProfiles(ctx context.Context) ([]driver.InstanceProfileInfo, error)

func (*IAM) ListPolicies

func (i *IAM) ListPolicies(ctx context.Context) ([]driver.PolicyInfo, error)

func (*IAM) ListPolicyVersions

func (i *IAM) ListPolicyVersions(ctx context.Context, policyARN string) ([]driver.PolicyVersionInfo, error)

func (*IAM) ListRoles

func (i *IAM) ListRoles(ctx context.Context) ([]driver.RoleInfo, error)

func (*IAM) ListUsers

func (i *IAM) ListUsers(ctx context.Context) ([]driver.UserInfo, error)

func (*IAM) RemoveRoleFromInstanceProfile

func (i *IAM) RemoveRoleFromInstanceProfile(ctx context.Context, profileName, roleName string) error

func (*IAM) RemoveUserFromGroup

func (i *IAM) RemoveUserFromGroup(ctx context.Context, userName, groupName string) error

func (*IAM) SetDefaultPolicyVersion

func (i *IAM) SetDefaultPolicyVersion(ctx context.Context, policyARN, versionID string) error

type Option

type Option func(*IAM)

func WithErrorInjection

func WithErrorInjection(inj *inject.Injector) Option

func WithLatency

func WithLatency(d time.Duration) Option

func WithMetrics

func WithMetrics(m *metrics.Collector) Option

func WithRateLimiter

func WithRateLimiter(l *ratelimit.Limiter) Option

func WithRecorder

func WithRecorder(r *recorder.Recorder) Option

Directories

Path Synopsis
Package driver defines the interface for IAM service implementations.
Package driver defines the interface for IAM service implementations.

Jump to

Keyboard shortcuts

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