Documentation
¶
Index ¶
- func WithHTTPClient(cl *http.Client) func(c *Client) error
- func WithHost(host string) func(c *Client) error
- func WithTimeout(d time.Duration) func(c *Client) error
- type Client
- func (c *Client) Blockchain() (data blockchain.Block, err error)
- func (c *Client) Delete(b, k string) (err error)
- func (c *Client) DeleteBucket(b string) (err error)
- func (c *Client) Files() (data []types.File, err error)
- func (c *Client) GetBucket(b string) (resp map[string]blockchain.Data, err error)
- func (c *Client) GetBucketKey(b, k string) (resp blockchain.Data, err error)
- func (c *Client) GetBucketKeys(b string) (resp []string, err error)
- func (c *Client) GetBuckets() (resp []string, err error)
- func (c *Client) Ledger() (data map[string]map[string]blockchain.Data, err error)
- func (c *Client) Machines() (resp []types.Machine, err error)
- func (c *Client) Put(b, k string, v interface{}) (err error)
- func (c *Client) Services() (resp []types.Service, err error)
- func (c *Client) Summary() (data types.Summary, err error)
- func (c *Client) Users() (data []types.User, err error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithHTTPClient ¶
WithHTTPClient 返回一个配置自定义 HTTP 客户端的选项函数
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client 结构体表示 API 客户端
func (*Client) Blockchain ¶
func (c *Client) Blockchain() (data blockchain.Block, err error)
Blockchain 获取区块链数据
func (*Client) DeleteBucket ¶
DeleteBucket 删除整个存储桶 b: 存储桶名称
func (*Client) GetBucketKey ¶
func (c *Client) GetBucketKey(b, k string) (resp blockchain.Data, err error)
GetBucketKey 获取指定存储桶中指定键的值 b: 存储桶名称 k: 键名
func (*Client) GetBucketKeys ¶
GetBucketKeys 获取指定存储桶中的所有键 b: 存储桶名称
func (*Client) GetBuckets ¶
GetBuckets 获取所有存储桶名称列表
Click to show internal directories.
Click to hide internal directories.