Documentation
¶
Index ¶
- type Client
- type Request
- type ZBox
- func (z *ZBox) BuildUrls(baseURLs []string, queryString map[string]string, pathFormat string, ...) []string
- func (z *ZBox) CreateTransport() *http.Transport
- func (z *ZBox) DoPost(req *Request, handle resty.Handle) *resty.Resty
- func (z *ZBox) InitWallet(js string) error
- func (z *ZBox) SignRequest(req *http.Request, allocationID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶ added in v1.7.3
type Request struct {
//AllocationID optional. allocation id
AllocationID string
//ConnectionID optional. session id
ConnectionID string
// ContentType content-type in header
ContentType string
// Body form data
Body io.Reader
// QueryString query string
QueryString map[string]string
}
Request request payload
type ZBox ¶
type ZBox struct {
// ClientID client id
ClientID string
// ClientKey client key
ClientKey string
// SignatureScheme signature scheme
SignatureScheme string
// Wallet wallet
Wallet *zcncrypto.Wallet
// NewRequest create http request
NewRequest func(method, url string, body io.Reader) (*http.Request, error)
}
ZBox sdk client instance
func (*ZBox) BuildUrls ¶ added in v1.7.3
func (z *ZBox) BuildUrls(baseURLs []string, queryString map[string]string, pathFormat string, pathArgs ...interface{}) []string
BuildUrls build full request url
func (*ZBox) CreateTransport ¶ added in v1.7.3
CreateTransport create http.Transport with default dial timeout
func (*ZBox) InitWallet ¶
InitWallet init wallet from json
Click to show internal directories.
Click to hide internal directories.