iam

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 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 added in v1.4.0

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

func (*IAM) AddUserToGroup added in v1.3.2

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 added in v1.3.2

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

func (*IAM) CreateGroup added in v1.3.2

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

func (*IAM) CreateInstanceProfile added in v1.4.0

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) 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 added in v1.3.2

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

func (*IAM) DeleteGroup added in v1.3.2

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

func (*IAM) DeleteInstanceProfile added in v1.4.0

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) 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 added in v1.3.2

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

func (*IAM) GetInstanceProfile added in v1.4.0

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) 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 added in v1.3.2

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 added in v1.3.2

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

func (*IAM) ListGroupsForUser added in v1.3.2

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

func (*IAM) ListInstanceProfiles added in v1.4.0

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) 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 added in v1.4.0

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

func (*IAM) RemoveUserFromGroup added in v1.3.2

func (i *IAM) RemoveUserFromGroup(ctx context.Context, userName, groupName 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