oss

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: MIT Imports: 4 Imported by: 27

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Object

type Object struct {
	Path             string
	Name             string
	LastModified     *time.Time
	StorageInterface StorageInterface
}

Object content object

func (Object) Get

func (object Object) Get(ctx context.Context) (*os.File, error)

Get retrieve object's content

type StorageInterface

type StorageInterface interface {
	Get(ctx context.Context, path string) (*os.File, error)
	GetStream(ctx context.Context, path string) (io.ReadCloser, error)
	Put(ctx context.Context, path string, reader io.Reader) (*Object, error)
	Delete(ctx context.Context, path string) error
	List(ctx context.Context, path string) ([]*Object, error)
	GetURL(ctx context.Context, path string) (string, error)
	GetEndpoint(ctx context.Context) string
}

StorageInterface define common API to operate storage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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