Documentation ¶
Index ¶
- func EpochTime() string
- func GzipDecode(in []byte) ([]byte, error)
- func HmacSha256Base64Signer(message string, secretKey string) (string, error)
- func IsoTime() string
- func PreHashString(timestamp string, method string, requestPath string, body string) string
- func Struct2JsonString(raw interface{}) (jsonString string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HmacSha256Base64Signer ¶
signing a message using: hmac sha256 + base64
eg: message = Pre_hash function comment secretKey = E65791902180E9EF4510DB6A77F6EBAE return signed string = TO6uwdqz+31SIPkd4I+9NiZGmVH74dXi+Fd5X0EzzSQ=
func PreHashString ¶
the pre hash string
eg: timestamp = 2018-03-08T10:59:25.789Z method = POST request_path = /orders?before=2&limit=30 body = {"product_id":"BTC-USD-0309","order_id":"377454671037440"} return pre hash string = 2018-03-08T10:59:25.789ZPOST/orders?before=2&limit=30{"product_id":"BTC-USD-0309","order_id":"377454671037440"}
func Struct2JsonString ¶
struct convert json string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.