key

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCredentials

func CreateCredentials(ctx context.Context, client UserCreator, user, group string) (accessKey, secretKey string, err error)

func CreatePolicy

func CreatePolicy(ctx context.Context, client PolicyCreator, canonicalUser, bucket string) error

func CreateUser

func CreateUser(ctx context.Context, client UserCreator, user, group string) (string, error)

func DeletePolicy

func DeletePolicy(ctx context.Context, client PolicyDeletor, canonicalUser, bucket string) error

func DeleteUser

func DeleteUser(ctx context.Context, client UserDeletor, user, group string) (string, error)

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)
}

Jump to

Keyboard shortcuts

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