Documentation ¶
Index ¶
- Constants
- func ContentMD5(b []byte) string
- func FileMD5(filename string) (string, int64)
- type Client
- func (c *Client) GetJSON(ctx context.Context, path string, query url.Values) (gjson.Result, error)
- func (c *Client) PostJSON(ctx context.Context, path string, params lib.X) (gjson.Result, error)
- func (c *Client) PutStream(ctx context.Context, uploadURL string, reader io.ReadSeeker) error
- func (c *Client) PutStreamFromFile(ctx context.Context, uploadURL, filename string) error
- func (c *Client) Verify(header http.Header, body []byte) error
- type Option
- type SignOption
- type Signer
Constants ¶
View Source
const ( HeaderContentMD5 = "Content-MD5" HeaderTSignOpenAppID = "X-Tsign-Open-App-Id" HeaderTSignOpenAuthMode = "X-Tsign-Open-Auth-Mode" HeaderTSignOpenCaTimestamp = "X-Tsign-Open-Ca-Timestamp" HeaderTSignOpenCaSignature = "X-Tsign-Open-Ca-Signature" HeaderTSignOpenTimestamp = "X-Tsign-Open-TIMESTAMP" HeaderTSignOpenSignature = "X-Tsign-Open-SIGNATURE" )
View Source
const ( AcceptAll = "*/*" AuthModeSign = "Signature" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client E签宝客户端
func NewSandbox ¶
NewSandbox 返回E签宝「沙箱环境」客户端
func (*Client) PutStreamFromFile ¶
PutStreamFromFile 通过文件上传文件流
type Option ¶
type Option func(c *Client)
Option 自定义设置项
func WithHttpClient ¶ added in v1.2.0
WithHttpClient 设置自定义 HTTP Client
Click to show internal directories.
Click to hide internal directories.