rsf

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Conn rpc.Client
}

func New

func New(mac *digest.Mac) Client

func NewEx

func NewEx(t http.RoundTripper) Client

func NewMacEx

func NewMacEx(mac *digest.Mac, t http.RoundTripper, bindRemoteIp string) Client

func (Client) ListPrefix

func (rsf Client) ListPrefix(l rpc.Logger, bucket, prefix, marker string, limit int) (entries []ListItem, markerOut string, err error)

---------------------------------------------------------- 1. 首次请求 marker = "" 2. 无论 err 值如何,均应该先看 entries 是否有内容 3. 如果后续没有更多数据,err 返回 EOF,markerOut 返回 ""(但不通过该特征来判断是否结束)

type ListItem

type ListItem struct {
	Key      string `json:"key"`
	Hash     string `json:"hash"`
	Fsize    int64  `json:"fsize"`
	PutTime  int64  `json:"putTime"`
	MimeType string `json:"mimeType"`
	EndUser  string `json:"endUser"`
}

type ListRet

type ListRet struct {
	Marker string     `json:"marker"`
	Items  []ListItem `json:"items"`
}

Jump to

Keyboard shortcuts

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