s3fake

package
v0.0.0-...-af0d2fc Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3Fake

type S3Fake struct {
	Address string
	Backend gofakes3.Backend
	Users   *sync.Map
	// contains filtered or unexported fields
}

S3Fake is a fake S3 server.

func NewS3Fake

func NewS3Fake(log logr.Logger, address string, backend gofakes3.Backend) *S3Fake

NewS3Fake creates a new fake S3 server.

func (*S3Fake) BucketExists

func (s *S3Fake) BucketExists(bucket string) (bool, error)

BucketExists checks if a bucket exists.

func (*S3Fake) CreateBucket

func (s *S3Fake) CreateBucket(bucket string) error

CreateBucket creates a bucket.

func (*S3Fake) CreateUser

func (s *S3Fake) CreateUser(name string) (*User, error)

CreateUser creates a user.

func (*S3Fake) DeleteBucket

func (s *S3Fake) DeleteBucket(bucket string) error

DeleteBucket deletes a bucket.

func (*S3Fake) DeleteUser

func (s *S3Fake) DeleteUser(name string) error

DeleteUser deletes a user.

func (*S3Fake) Run

func (s *S3Fake) Run(ctx context.Context) error

Run starts the fake S3 server.

func (*S3Fake) UserExists

func (s *S3Fake) UserExists(name string) (*User, error)

UserExists checks if a user exists.

type User

type User struct {
	// ID is the ID of the user.
	ID string

	// Name is the name of the user.
	Name string

	// accessKey is the access key for the user.
	AccessKey string

	// secretKey is the secret key for the user.
	SecretKey string
}

Jump to

Keyboard shortcuts

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