oss

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(key string) error

Delete deletes the file pointed to by key.

func Exist

func Exist(key string) bool

Exist checks if the file pointed to by key exists.

func Get

func Get(key string) (*minio.Object, error)

Get gets the file pointed to by key.

func GetPresignedURL

func GetPresignedURL(key string, fileName string, expiration time.Duration) (string, error)

GetPresignedURL gets the presigned URL for the file pointed to by key.

func GetUploadPresignedURL

func GetUploadPresignedURL(key string, expiration time.Duration) (string, error)

GetUploadPresignedURL gets the presigned URL for the file upload, use PUT method in frontend.

func GetWithPath

func GetWithPath(key string, path string) error

GetWithPath downloads and saves the object as a file in the local filesystem by key.

func Init

func Init()

func Put

func Put(key string, reader io.Reader, objectSize int64) error

Put uploads the content from r to the oss key.

func PutByPath

func PutByPath(key string, path string) error

PutByPath uploads the content from a file to the oss key.

func PutBytes

func PutBytes(key string, data []byte) error

PutBytes uploads the byte array content to the oss key.

func Size

func Size(key string) (string, error)

Size returns the size of the file pointed to by key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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