tidbclient

package
v1.2.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const MAX_OPEN_CONNS = 1024

Variables

This section is empty.

Functions

func GarbageCollectionFromObject

func GarbageCollectionFromObject(o *Object) (gc GarbageCollection)

Types

type TidbClient

type TidbClient struct {
	Client *sql.DB
}

func NewTidbClient

func NewTidbClient() *TidbClient

func (*TidbClient) AbortTrans added in v1.1.5

func (t *TidbClient) AbortTrans(tx interface{}) (err error)

func (*TidbClient) AddBucketForUser

func (t *TidbClient) AddBucketForUser(bucketName, userId string) (err error)

func (*TidbClient) CheckAndPutBucket

func (t *TidbClient) CheckAndPutBucket(bucket Bucket) (bool, error)

func (*TidbClient) CommitTrans added in v1.1.5

func (t *TidbClient) CommitTrans(tx interface{}) (err error)

func (*TidbClient) CreateMultipart

func (t *TidbClient) CreateMultipart(multipart Multipart) (err error)

func (*TidbClient) DeleteBucket

func (t *TidbClient) DeleteBucket(bucket Bucket) error

func (*TidbClient) DeleteMultipart

func (t *TidbClient) DeleteMultipart(multipart *Multipart, tx interface{}) (err error)

func (*TidbClient) DeleteObject

func (t *TidbClient) DeleteObject(object *Object, tx interface{}) (err error)

func (*TidbClient) DeleteObjectMap

func (t *TidbClient) DeleteObjectMap(objMap *ObjMap, tx interface{}) (err error)

func (*TidbClient) GetAllObject

func (t *TidbClient) GetAllObject(bucketName, objectName, version string) (object []*Object, err error)

func (*TidbClient) GetBucket

func (t *TidbClient) GetBucket(bucketName string) (bucket Bucket, err error)

func (*TidbClient) GetBuckets added in v1.1.4

func (t *TidbClient) GetBuckets() (buckets []Bucket, err error)

func (*TidbClient) GetCluster

func (t *TidbClient) GetCluster(fsid, pool string) (cluster Cluster, err error)

cluster

func (*TidbClient) GetGarbageCollection

func (t *TidbClient) GetGarbageCollection(bucketName, objectName, version string) (gc GarbageCollection, err error)

util func

func (*TidbClient) GetMultipart

func (t *TidbClient) GetMultipart(bucketName, objectName, uploadId string) (multipart Multipart, err error)

func (*TidbClient) GetObject

func (t *TidbClient) GetObject(bucketName, objectName, version string) (object *Object, err error)

func (*TidbClient) GetObjectMap

func (t *TidbClient) GetObjectMap(bucketName, objectName string) (objMap *ObjMap, err error)

objmap

func (*TidbClient) GetUserBuckets

func (t *TidbClient) GetUserBuckets(userId string) (buckets []string, err error)

func (*TidbClient) ListMultipartUploads

func (t *TidbClient) ListMultipartUploads(bucketName, keyMarker, uploadIdMarker, prefix, delimiter, encodingType string, maxUploads int) (uploads []datatype.Upload, prefixs []string, isTruncated bool, nextKeyMarker, nextUploadIdMarker string, err error)

func (*TidbClient) ListObjects

func (t *TidbClient) ListObjects(bucketName, marker, verIdMarker, prefix, delimiter string, versioned bool, maxKeys int) (retObjects []*Object, prefixes []string, truncated bool, nextMarker, nextVerIdMarker string, err error)

func (*TidbClient) NewTrans added in v1.1.5

func (t *TidbClient) NewTrans() (tx interface{}, err error)

func (*TidbClient) PutBucket

func (t *TidbClient) PutBucket(bucket Bucket) error

Actually this method is used to update bucket

func (*TidbClient) PutBucketToLifeCycle

func (t *TidbClient) PutBucketToLifeCycle(lifeCycle LifeCycle) error

func (*TidbClient) PutObject

func (t *TidbClient) PutObject(object *Object, tx interface{}) (err error)

func (*TidbClient) PutObjectMap

func (t *TidbClient) PutObjectMap(objMap *ObjMap, tx interface{}) (err error)

func (*TidbClient) PutObjectPart

func (t *TidbClient) PutObjectPart(multipart *Multipart, part *Part, tx interface{}) (err error)

func (*TidbClient) PutObjectToGarbageCollection

func (t *TidbClient) PutObjectToGarbageCollection(object *Object, tx interface{}) (err error)

gc

func (*TidbClient) RemoveBucketForUser

func (t *TidbClient) RemoveBucketForUser(bucketName string, userId string) (err error)

func (*TidbClient) RemoveBucketFromLifeCycle

func (t *TidbClient) RemoveBucketFromLifeCycle(bucket Bucket) error

func (*TidbClient) RemoveGarbageCollection

func (t *TidbClient) RemoveGarbageCollection(garbage GarbageCollection) error

func (*TidbClient) ScanGarbageCollection

func (t *TidbClient) ScanGarbageCollection(limit int, startRowKey string) (gcs []GarbageCollection, err error)

func (*TidbClient) ScanLifeCycle

func (t *TidbClient) ScanLifeCycle(limit int, marker string) (result ScanLifeCycleResult, err error)

func (*TidbClient) UpdateAppendObject added in v1.2.1

func (t *TidbClient) UpdateAppendObject(o *Object) (err error)

func (*TidbClient) UpdateObjectAcl added in v1.1.1

func (t *TidbClient) UpdateObjectAcl(object *Object) error

func (*TidbClient) UpdateObjectAttrs added in v1.1.8

func (t *TidbClient) UpdateObjectAttrs(object *Object) error

func (*TidbClient) UpdateUsage

func (t *TidbClient) UpdateUsage(bucketName string, size int64, tx interface{}) (err error)

Jump to

Keyboard shortcuts

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