Documentation ¶
Index ¶
- type Bucket
- func (b *Bucket) ChkBucket() (bool, error)
- func (b *Bucket) CreateBucket() error
- func (b *Bucket) Delete(filename string) error
- func (b *Bucket) Download(file *os.File, filename string) error
- func (b *Bucket) GetBucketName() string
- func (b *Bucket) GetEndpoint() string
- func (b *Bucket) GetName() string
- func (b *Bucket) GetObjectInfo(filename string) (*ObjectInfo, error)
- func (b *Bucket) ListObjectInfo() ([]ObjectInfo, error)
- func (b *Bucket) Upload(file *os.File, filename string) error
- type ObjectInfo
- type Objectstore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket struct { Name string AccessKey string SecretKey string Endpoint string Region string BucketName string // contains filtered or unexported fields }
Bucket for connection to a bucket in object store
func NewBucket ¶
func NewBucket(name, accessKey, secretKey, endpoint, region, bucketName string, insecure bool) *Bucket
NewBucket returns new Bucket
func (*Bucket) GetBucketName ¶
GetBucketName returns bucket's BacketName
func (*Bucket) GetEndpoint ¶
GetEndpoint returns bucket's Endpoint
func (*Bucket) GetObjectInfo ¶
func (b *Bucket) GetObjectInfo(filename string) (*ObjectInfo, error)
GetObjectInfo gets info of a file in the bucket
func (*Bucket) ListObjectInfo ¶
func (b *Bucket) ListObjectInfo() ([]ObjectInfo, error)
ListObjectInfo lists object info
type ObjectInfo ¶
ObjectInfo retains snapshot object's info
type Objectstore ¶
type Objectstore interface { ChkBucket() (bool, error) CreateBucket() error Upload(file *os.File, filename string) error Download(file *os.File, filename string) error Delete(filename string) error GetObjectInfo(filename string) (*ObjectInfo, error) ListObjectInfo() ([]ObjectInfo, error) GetName() string GetEndpoint() string GetBucketName() string }
Objectstore interfaces
Click to show internal directories.
Click to hide internal directories.