iam

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 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) 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) 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) 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) 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) 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) 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)

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