qxObjectStorage

package
v0.0.55 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ObjectStorageTypeMinio = "minio"
	ObjectStorageTypeCos   = "cos"
	ObjectStorageTypeOss   = "oss"
	ObjectStorageTypeS3    = "s3"
)

Variables

Functions

func CheckObjectStorageSupport

func CheckObjectStorageSupport(osType string) bool

func NewCustomS3Client

func NewCustomS3Client(ctx context.Context, osType string, AccessKey, AccessSecret, Region, AccessEndpoint string) (*s3.Client, error)

Types

type Presigner

type Presigner interface {
	GetPresignClient() *s3.PresignClient
	GetObject(ctx context.Context, bucketName string, objectKey string, lifetimeSecs int64) (*v4.PresignedHTTPRequest, error)
	PutObject(ctx context.Context, bucketName string, objectKey string, lifetimeSecs int64) (*v4.PresignedHTTPRequest, error)
	DeleteObject(ctx context.Context, bucketName string, objectKey string) (*v4.PresignedHTTPRequest, error)
	PresignPostObject(ctx context.Context, bucketName string, objectKey string, lifetimeSecs int64) (*s3.PresignedPostRequest, error)
	PresignPutObject(ctx context.Context, bucketName string, objectKey string, lifetimeSecs int64) (*v4.PresignedHTTPRequest, error)
}

func NewPresigner

func NewPresigner(s3Client *s3.Client) Presigner

Jump to

Keyboard shortcuts

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