confs3

package
v1.6.5-rc3 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultGetObjectOptions    = minio.GetObjectOptions{}
	DefaultRemoveObjectOptions = minio.RemoveObjectOptions{}
)

Functions

func COSPresignedValues

func COSPresignedValues(db *ObjectDB, key string, exp time.Duration) url.Values

func HMAC

func HMAC(key, msg, signMethod string) []byte

Types

type AuthTime

type AuthTime struct {
	SignStartTime time.Time
	SignEndTime   time.Time
	KeyStartTime  time.Time
	KeyEndTime    time.Time
}

AuthTime is a struct storing the q-signSearch-time and q-key-time which are needed to generate signature

func NewAuthTime

func NewAuthTime(du time.Duration) *AuthTime

type ObjectDB

type ObjectDB struct {
	Endpoint        string
	Region          string
	AccessKeyID     string
	SecretAccessKey types.Password
	BucketName      string
	Secure          bool
	UrlExpire       types.Duration
	Presigned       PresignedFn `env:"-"`
}

ObjectDB Deprecated

func (*ObjectDB) Client

func (db *ObjectDB) Client() (*minio.Client, error)

func (*ObjectDB) Delete

func (db *ObjectDB) Delete(key string) error

func (*ObjectDB) DeleteObject

func (db *ObjectDB) DeleteObject(ctx context.Context, meta *filesystem.ObjectMeta) error

func (*ObjectDB) DownloadUrl added in v1.2.3

func (db *ObjectDB) DownloadUrl(key string) (string, error)

func (*ObjectDB) ListObjectByGroup

func (db *ObjectDB) ListObjectByGroup(ctx context.Context, grp string) ([]*filesystem.ObjectMeta, error)

func (*ObjectDB) LivenessCheck

func (db *ObjectDB) LivenessCheck() map[string]string

func (*ObjectDB) PresignedPutObject

func (db *ObjectDB) PresignedPutObject(ctx context.Context, meta *filesystem.ObjectMeta, exp time.Duration) (string, error)

func (*ObjectDB) ProtectURL

func (db *ObjectDB) ProtectURL(ctx context.Context, meta *filesystem.ObjectMeta, exp time.Duration) (*url.URL, error)

func (*ObjectDB) PublicURL

func (db *ObjectDB) PublicURL(meta *filesystem.ObjectMeta) *url.URL

func (*ObjectDB) PutObject

func (db *ObjectDB) PutObject(ctx context.Context, r io.Reader, meta *filesystem.ObjectMeta) error

func (*ObjectDB) Read

func (db *ObjectDB) Read(key string) ([]byte, error)

func (*ObjectDB) ReadObject

func (db *ObjectDB) ReadObject(ctx context.Context, w io.Writer, meta *filesystem.ObjectMeta) error

func (*ObjectDB) SetDefault added in v1.2.3

func (db *ObjectDB) SetDefault()

func (*ObjectDB) StatObject added in v1.4.6

func (db *ObjectDB) StatObject(key string) (*filesystem.ObjectMeta, error)

StatObject Deprecated

func (*ObjectDB) StatsObject

func (db *ObjectDB) StatsObject(ctx context.Context, meta *filesystem.ObjectMeta) (*filesystem.ObjectMeta, error)

func (*ObjectDB) Upload

func (db *ObjectDB) Upload(key string, content []byte) error

type PresignedFn

type PresignedFn func(db *ObjectDB, key string, exp time.Duration) url.Values

type S3Endpoint

type S3Endpoint interface {
	Endpoint() string
	AccessKeyID() string
	SecretAccessKey() string
	BucketName() string
	Secure() bool
}

Jump to

Keyboard shortcuts

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