objectstorage

package
v0.0.0-...-ec0d835 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// MakeBucket creates a new bucket on object storage.
	MakeBucket(ctx context.Context, bucketName string) error
	// BucketExists checks if a bucket exists.
	BucketExists(ctx context.Context, bucketName string) (bool, error)
	// GetObject gets an object from object storage.
	GetObject(ctx context.Context, bucketName string, objectName string) (io.ReadCloser, error)
	// PutObject puts an object to object storage.
	PutObject(ctx context.Context, bucketName string, objectName string, reader io.Reader, contentType string) error
	// DeleteObject deletes an object from object storage.
	DeleteObject(ctx context.Context, bucketName string, objectName string) error
}

Client is an interface for object storage client.

func NewClient

func NewClient(ctx context.Context, appLogger *logger.AppLogger, endpoint string,
	region string, accessKey string, secretKey string) Client

NewClient creates a new object storage client.

Jump to

Keyboard shortcuts

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