Documentation
¶
Index ¶
- Constants
- Variables
- type BCS
- type Bucket
- func (this *Bucket) Create() error
- func (this *Bucket) CreateWithACL(acl string) error
- func (this *Bucket) Delete() error
- func (this *Bucket) GetACL() (string, error)
- func (this *Bucket) ListObjects(prefix string, start, limit int) (*ObjectCollection, error)
- func (this *Bucket) Object(absolutePath string) *Object
- func (this *Bucket) SetACL(acl string) error
- func (this *Bucket) Superfile(absolutePath string, objects []*Object) *Superfile
- type HttpClient
- func (this *HttpClient) Delete(url string) (*http.Response, []byte, error)
- func (this *HttpClient) Get(url string) (*http.Response, []byte, error)
- func (this *HttpClient) Head(url string) (*http.Response, []byte, error)
- func (this *HttpClient) Put(url string, data io.Reader, size int64, modifyHeader func(header *http.Header)) (*http.Response, []byte, error)
- type Object
- func (this *Object) CopyTo(target *Object) (*Object, error)
- func (this *Object) Delete() error
- func (this *Object) Get() (body []byte, err error)
- func (this *Object) GetACL() (string, error)
- func (this *Object) Head() error
- func (this *Object) Link() string
- func (this *Object) PublicLink() string
- func (this *Object) Put(file io.Reader, size int64) (*Object, error)
- func (this *Object) PutFile(localFile string) (*Object, error)
- func (this *Object) PutFileWithACL(localFile, acl string) (*Object, error)
- func (this *Object) SetACL(acl string) error
- type ObjectCollection
- type Superfile
Constants ¶
View Source
const ( GET = "GET" POST = "POST" PUT = "PUT" HEAD = "HEAD" DELETE = "DELETE" )
View Source
const ( ACL_PRIVATE = "private" ACL_PUBLIC_READ = "public-read" ACL_PUBLIC_WRITE = "public-write" ACL_PUBLIC_READ_WRITE = "public-read-write" ACL_PUBLIC_CONTROL = "public-control" )
View Source
const ( HEADER_COPY_SOURCE = "x-bs-copy-source" HEADER_ACL = "X-Bs-Acl" HEADER_VERSION = "X-Bs-Version" HEADER_FILESIZE = "X-Bs-File-Size" HEADER_ETAG = "Etag" HEADER_CONTENT_MD5 = "Content-Md5" )
View Source
const (
BCS_HOST = "http://bcs.duapp.com"
)
Variables ¶
View Source
var DEBUG bool = false
View Source
var DEBUG_REQUEST_BODY = false
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket struct {
Name string `json:"bucket_name"`
// contains filtered or unexported fields
}
func (*Bucket) CreateWithACL ¶
func (*Bucket) ListObjects ¶
func (this *Bucket) ListObjects(prefix string, start, limit int) (*ObjectCollection, error)
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
func NewHttpClient ¶
func NewHttpClient() *HttpClient
type Object ¶
type Object struct {
VersionKey string `json:"version_key"`
AbsolutePath string `json:"object"`
Superfile string `json:"superfile"`
Size int64 `json:"size,string"`
ParentDir string `json:"parent_dir"`
IsDir string `json:"is_dir"`
MDatetime string `json:"mdatetime"`
RefKey string `json:"ref_key"`
ContentMD5 string `json:"content_md5"`
// contains filtered or unexported fields
}
func (*Object) PublicLink ¶
func (*Object) PutFileWithACL ¶
type ObjectCollection ¶
Click to show internal directories.
Click to hide internal directories.

