Documentation
¶
Index ¶
- func CreatePolicy(ctx context.Context, client BucketAccessGrantor, userName, bucketName string) error
- func GrantBucketAccess(ctx context.Context, client BucketAccessGrantor, name, bucketID string) (accessKey, secretKey string, err error)
- func RevokeBucketAccess(ctx context.Context, client BucketAccessRevoker, userName string) error
- type BucketAccessGrantor
- type BucketAccessRevoker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePolicy ¶
func CreatePolicy(ctx context.Context, client BucketAccessGrantor, userName, bucketName string) error
Create policy via IAM API
func GrantBucketAccess ¶
func GrantBucketAccess(ctx context.Context, client BucketAccessGrantor, name, bucketID string) (accessKey, secretKey string, err error)
Grant bucket access using IAM
func RevokeBucketAccess ¶
func RevokeBucketAccess(ctx context.Context, client BucketAccessRevoker, userName string) error
Revoke bucket access for IAM
Types ¶
type BucketAccessGrantor ¶
type BucketAccessGrantor interface {
CreateUser(ctx context.Context, params *iam.CreateUserInput, optFns ...func(*iam.Options)) (*iam.CreateUserOutput, error)
PutUserPolicy(ctx context.Context, params *iam.PutUserPolicyInput, optFns ...func(*iam.Options)) (*iam.PutUserPolicyOutput, error)
CreateAccessKey(ctx context.Context, params *iam.CreateAccessKeyInput, optFns ...func(*iam.Options)) (*iam.CreateAccessKeyOutput, error)
}
type BucketAccessRevoker ¶
type BucketAccessRevoker interface {
ListUserPolicies(ctx context.Context, params *iam.ListUserPoliciesInput, optFns ...func(*iam.Options)) (*iam.ListUserPoliciesOutput, error)
DeleteUserPolicy(ctx context.Context, params *iam.DeleteUserPolicyInput, optFns ...func(*iam.Options)) (*iam.DeleteUserPolicyOutput, error)
ListAccessKeys(ctx context.Context, params *iam.ListAccessKeysInput, optFns ...func(*iam.Options)) (*iam.ListAccessKeysOutput, error)
DeleteAccessKey(ctx context.Context, params *iam.DeleteAccessKeyInput, optFns ...func(*iam.Options)) (*iam.DeleteAccessKeyOutput, error)
DeleteUser(ctx context.Context, params *iam.DeleteUserInput, optFns ...func(*iam.Options)) (*iam.DeleteUserOutput, error)
}
Click to show internal directories.
Click to hide internal directories.