Documentation ¶
Index ¶
- Variables
- func New(config gfs.IAdapterConfig) gfs.IAdapter
- type Adapter
- func (a *Adapter) Bucket(bucket string) gfs.IAdapter
- func (a *Adapter) Client() (*bos.Client, error)
- func (a *Adapter) Copy(source, destination string) (bool, error)
- func (a *Adapter) CopyObject(source, destination string, deleteSource bool) (bool, error)
- func (a *Adapter) Delete(path string) (int64, error)
- func (a *Adapter) DiskName() string
- func (a *Adapter) Exist(path string) (bool, error)
- func (a *Adapter) MimeType(path string) (string, error)
- func (a *Adapter) Move(source, destination string) (bool, error)
- func (a *Adapter) ObjectMeta(path string) (*api.GetObjectMetaResult, error)
- func (a *Adapter) Read(path string) ([]byte, error)
- func (a *Adapter) Size(path string) (int64, error)
- func (a *Adapter) URL(path string) (*url.URL, error)
- func (a *Adapter) Update(path string, contents []byte) error
- func (a *Adapter) UpdateStream(path, resource string) error
- func (a *Adapter) Write(path string, contents []byte) error
- func (a *Adapter) WriteReader(path string, reader io.Reader) error
- func (a *Adapter) WriteStream(path, resource string) error
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultEndpoint = "https://bj.bcebos.com"
)
Functions ¶
Types ¶
type Adapter ¶
type Adapter struct { Config *Config // contains filtered or unexported fields }
func (*Adapter) CopyObject ¶
func (*Adapter) ObjectMeta ¶
func (a *Adapter) ObjectMeta(path string) (*api.GetObjectMetaResult, error)
func (*Adapter) UpdateStream ¶
func (*Adapter) WriteStream ¶
type Config ¶
type Config struct { CDN string `json:"cdn" xml:"CDN" yaml:"CDN"` Ak string `json:"ak" xml:"Ak" yaml:"Ak"` Sk string `json:"sk" xml:"Sk" yaml:"Sk"` //https://cloud.baidu.com/doc/BOS/s/Ojwvyrpgd Endpoint string `json:"endpoint" xml:"Endpoint" yaml:"Endpoint"` RedirectDisabled bool `json:"redirect_disabled" xml:"RedirectDisabled" yaml:"RedirectDisabled"` Bucket string `json:"bucket" xml:"Bucket" yaml:"Bucket"` }
func (*Config) NewAdapter ¶
Click to show internal directories.
Click to hide internal directories.