Documentation
¶
Index ¶
- func CreateCredentials(ctx context.Context, client UserCreator, user, group string) (accessKey, secretKey string, err error)
- func CreatePolicy(ctx context.Context, client PolicyCreator, canonicalUser, bucket string) error
- func CreateUser(ctx context.Context, client UserCreator, user, group string) (string, error)
- func DeletePolicy(ctx context.Context, client PolicyDeletor, canonicalUser, bucket string) error
- func DeleteUser(ctx context.Context, client UserDeletor, user, group string) (string, error)
- func GrantBucketAccess(ctx context.Context, adminClient UserCreator, s3Client PolicyCreator, ...) (accessKey, secretKey string, err error)
- func RevokeBucketAccess(ctx context.Context, adminClient UserDeletor, s3Client PolicyDeletor, ...) error
- type PolicyCreator
- type PolicyDeletor
- type UserCreator
- type UserDeletor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCredentials ¶
func CreatePolicy ¶
func CreatePolicy(ctx context.Context, client PolicyCreator, canonicalUser, bucket string) error
func CreateUser ¶
func DeletePolicy ¶
func DeletePolicy(ctx context.Context, client PolicyDeletor, canonicalUser, bucket string) error
func DeleteUser ¶
func GrantBucketAccess ¶
func GrantBucketAccess(ctx context.Context, adminClient UserCreator, s3Client PolicyCreator, user, group, bucket string) (accessKey, secretKey string, err error)
Grant bucket access using keys
func RevokeBucketAccess ¶
func RevokeBucketAccess(ctx context.Context, adminClient UserDeletor, s3Client PolicyDeletor, user, group, bucket string) error
Revoke bucket access using keys
Types ¶
type PolicyCreator ¶
type PolicyCreator interface {
GetBucketPolicy(ctx context.Context, params *s3.GetBucketPolicyInput, optFns ...func(*s3.Options)) (*s3.GetBucketPolicyOutput, error)
PutBucketPolicy(ctx context.Context, params *s3.PutBucketPolicyInput, optFns ...func(*s3.Options)) (*s3.PutBucketPolicyOutput, error)
}
type PolicyDeletor ¶
type PolicyDeletor interface {
GetBucketPolicy(ctx context.Context, params *s3.GetBucketPolicyInput, optFns ...func(*s3.Options)) (*s3.GetBucketPolicyOutput, error)
DeleteBucketPolicy(ctx context.Context, params *s3.DeleteBucketPolicyInput, optFns ...func(*s3.Options)) (*s3.DeleteBucketPolicyOutput, error)
PutBucketPolicy(ctx context.Context, params *s3.PutBucketPolicyInput, optFns ...func(*s3.Options)) (*s3.PutBucketPolicyOutput, error)
}
type UserCreator ¶
type UserCreator interface {
PutUser(ctx context.Context, body api.PutUserJSONRequestBody, reqEditors ...api.RequestEditorFn) (*http.Response, error)
PutUserCredentialsWithResponse(ctx context.Context, params *api.PutUserCredentialsParams, reqEditors ...api.RequestEditorFn) (*api.PutUserCredentialsResponse, error)
}
type UserDeletor ¶
type UserDeletor interface {
GetUser(ctx context.Context, params *api.GetUserParams, reqEditors ...api.RequestEditorFn) (*http.Response, error)
DeleteUser(ctx context.Context, params *api.DeleteUserParams, reqEditors ...api.RequestEditorFn) (*http.Response, error)
}
Click to show internal directories.
Click to hide internal directories.