Documentation ¶
Index ¶
- Variables
- func UnmarshalTriparError(r *http.Response) (err error)
- func UnmarshalTriparResponse(r *http.Response, i interface{}) error
- type BufferPool
- type BufferPoolIface
- type Entries
- type Entry
- type Error
- type PutPiece
- type Stat
- type Status
- type TriparClient
- func (tp *TriparClient) CopyObject(ctx context.Context, path string, nupath string) (err error)
- func (tp *TriparClient) CreateDirectories(ctx context.Context, path string) (err error)
- func (tp *TriparClient) CreateDirectory(ctx context.Context, path string) (err error)
- func (tp *TriparClient) DeleteDirectory(ctx context.Context, path string) (err error)
- func (tp *TriparClient) DeleteObject(ctx context.Context, path string) (err error)
- func (tp *TriparClient) Fsync(ctx context.Context, path string) (err error)
- func (tp *TriparClient) GetObject(ctx context.Context, path string, span *ioutils.FileSpan) (rd io.ReadCloser, info *Stat, err error)
- func (tp *TriparClient) List(ctx context.Context, path string) (entries Entries, err error)
- func (tp *TriparClient) MoveObject(ctx context.Context, path string, nupath string) (err error)
- func (tp *TriparClient) PutObject(ctx context.Context, path string, reader io.Reader) (err error)
- func (tp *TriparClient) Stat(ctx context.Context, path string) (info Stat, err error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func UnmarshalTriparError ¶
func UnmarshalTriparResponse ¶
Types ¶
type BufferPool ¶
type BufferPool struct {
// contains filtered or unexported fields
}
func NewBufferPool ¶
func NewBufferPool(capacity int, bufferSize int64) *BufferPool
func (*BufferPool) Get ¶
func (bp *BufferPool) Get() []byte
func (*BufferPool) Put ¶
func (bp *BufferPool) Put(buffer []byte)
type BufferPoolIface ¶
type Error ¶
type Error struct { Code int `json:"error_code"` LMsg string `json:"long_message"` SMsg string `json:"short_message"` }
func UnmarshalError ¶
type Status ¶
type Status struct { Atime float64 `json:"atime"` Blksize int64 `json:"blksize"` Blocks int64 `json:"blocks"` Ctime float64 `json:"ctime"` Dev int32 `json:"dev"` Gid int32 `json:"gid"` // Ino int64 `json:"ino"` Mode int32 `json:"mode"` Mtime float64 `json:"mtime"` Nlink int32 `json:"nlink"` Rdev int32 `json:"rdev"` Size int64 `json:"size"` Uid int32 `json:"uid"` }
type TriparClient ¶
type TriparClient struct { HTTPClient *httpclient.HTTPClient // contains filtered or unexported fields }
func NewTriparClient ¶
func NewTriparClient( endpoint string, user string, pass string, share string, bp BufferPoolIface, getChunkSize int64, ) (tp *TriparClient, err error)
func (*TriparClient) CopyObject ¶
func (*TriparClient) CreateDirectories ¶
func (tp *TriparClient) CreateDirectories(ctx context.Context, path string) (err error)
func (*TriparClient) CreateDirectory ¶
func (tp *TriparClient) CreateDirectory(ctx context.Context, path string) (err error)
func (*TriparClient) DeleteDirectory ¶
func (tp *TriparClient) DeleteDirectory(ctx context.Context, path string) (err error)
func (*TriparClient) DeleteObject ¶
func (tp *TriparClient) DeleteObject(ctx context.Context, path string) (err error)
func (*TriparClient) Fsync ¶
func (tp *TriparClient) Fsync(ctx context.Context, path string) (err error)
func (*TriparClient) GetObject ¶
func (tp *TriparClient) GetObject( ctx context.Context, path string, span *ioutils.FileSpan, ) (rd io.ReadCloser, info *Stat, err error)
func (*TriparClient) MoveObject ¶
Click to show internal directories.
Click to hide internal directories.