Documentation ¶
Index ¶
- Variables
- func COSPresignedValues(db *ObjectDB, key string, exp time.Duration) url.Values
- func HMAC(key, msg, signMethod string) []byte
- type AuthTime
- type ObjectDB
- func (db *ObjectDB) Client() (*minio.Client, error)
- func (db *ObjectDB) Delete(key string) error
- func (db *ObjectDB) DeleteObject(ctx context.Context, meta *ObjectMeta) error
- func (db *ObjectDB) DownloadUrl(key string) (string, error)
- func (db *ObjectDB) ListObjectByGroup(ctx context.Context, grp string) ([]*ObjectMeta, error)
- func (db *ObjectDB) LivenessCheck() map[string]string
- func (db *ObjectDB) PresignedPutObject(ctx context.Context, meta *ObjectMeta, exp time.Duration) (string, error)
- func (db *ObjectDB) ProtectURL(ctx context.Context, meta *ObjectMeta, exp time.Duration) (*url.URL, error)
- func (db *ObjectDB) PublicURL(meta *ObjectMeta) *url.URL
- func (db *ObjectDB) PutObject(ctx context.Context, r io.Reader, meta *ObjectMeta) error
- func (db *ObjectDB) Read(key string) ([]byte, error)
- func (db *ObjectDB) ReadObject(ctx context.Context, w io.Writer, meta *ObjectMeta) error
- func (db *ObjectDB) SetDefault()
- func (db *ObjectDB) StatsObject(ctx context.Context, meta *ObjectMeta) (*ObjectMeta, error)
- func (db *ObjectDB) Upload(key string, content []byte) error
- type ObjectMeta
- type PresignedFn
- type S3Endpoint
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultGetObjectOptions = minio.GetObjectOptions{} DefaultRemoveObjectOptions = minio.RemoveObjectOptions{} )
View Source
var ErrInvalidObjectKey = errors.New("invalid object key")
Functions ¶
func COSPresignedValues ¶
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 ¶
type ObjectDB ¶
type ObjectDB struct { Endpoint string Region string AccessKeyID string SecretAccessKey types.Password BucketName string Secure bool UrlExpire types.Duration Presigned PresignedFn `env:"-"` }
func (*ObjectDB) DeleteObject ¶
func (db *ObjectDB) DeleteObject(ctx context.Context, meta *ObjectMeta) error
func (*ObjectDB) DownloadUrl ¶ added in v1.2.3
func (*ObjectDB) ListObjectByGroup ¶
func (*ObjectDB) LivenessCheck ¶
func (*ObjectDB) PresignedPutObject ¶
func (*ObjectDB) ProtectURL ¶
func (*ObjectDB) ReadObject ¶
func (*ObjectDB) SetDefault ¶ added in v1.2.3
func (db *ObjectDB) SetDefault()
func (*ObjectDB) StatsObject ¶
func (db *ObjectDB) StatsObject(ctx context.Context, meta *ObjectMeta) (*ObjectMeta, error)
type ObjectMeta ¶
type ObjectMeta struct { ObjectID uint64 `json:"objectID"` Group string `json:"group"` Size int64 `json:"size"` ContentType string `json:"contentType"` ETag string `json:"etag"` }
func ParseObjectMetaFromKey ¶
func ParseObjectMetaFromKey(key string) (*ObjectMeta, error)
func (ObjectMeta) Key ¶
func (meta ObjectMeta) Key() string
Click to show internal directories.
Click to hide internal directories.