storageservice

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const RecordNotFoundMsg = "status code: 404"

RecordNotFoundMsg define status 404 message.

Variables

View Source
var (
	ErrInvalidStorageType = errors.New("invalid storage type")
	ErrStorageTypeEmpty   = errors.New("STORAGE_TYPE environment variable is not set")
)

Sentinel errors for storage validation.

Functions

This section is empty.

Types

type CloudStorageAssessor

type CloudStorageAssessor struct {
	// contains filtered or unexported fields
}

CloudStorageAssessor struct.

func NewCloudStorageAssessor deprecated

func NewCloudStorageAssessor() *CloudStorageAssessor

NewCloudStorageAssessor creates a new CloudStorageAssessor.

Deprecated: Use NewCloudStorageAssessorWithConfig for better error handling.

func NewCloudStorageAssessorForTest added in v1.11.2

func NewCloudStorageAssessorForTest(inst cloudstorages.StorageInstance) *CloudStorageAssessor

NewCloudStorageAssessorForTest creates a CloudStorageAssessor with the given instance for testing.

func NewCloudStorageAssessorWithConfig added in v1.10.4

func NewCloudStorageAssessorWithConfig(ctx context.Context) (*CloudStorageAssessor, error)

NewCloudStorageAssessorWithConfig creates a new CloudStorageAssessor with proper error handling.

func (*CloudStorageAssessor) Delete

func (csa *CloudStorageAssessor) Delete(ctx context.Context, key string) error

Delete remove storage contents.

func (*CloudStorageAssessor) Get

func (csa *CloudStorageAssessor) Get(ctx context.Context, key string) (string, []byte, error)

Get returns storage contents.

func (*CloudStorageAssessor) GetByStreaming added in v1.5.0

func (csa *CloudStorageAssessor) GetByStreaming(ctx context.Context, key string) (string, int, io.ReadCloser, error)

GetByStreaming returns storage contents by streaming.

func (*CloudStorageAssessor) GetObjectInfo added in v1.6.0

func (csa *CloudStorageAssessor) GetObjectInfo(ctx context.Context, key string) (entity.StorageObjectInfo, error)

GetObjectInfo returns storage contents info.

func (*CloudStorageAssessor) Put

func (csa *CloudStorageAssessor) Put(ctx context.Context, path string, file io.ReadSeeker) error

Put puts storage contents.

Jump to

Keyboard shortcuts

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