Documentation ¶
Index ¶
- func GetResponseBody(url string, postP PostParams) ([]byte, error)
- func GetSeed(url string) ([]byte, error)
- func Send(ctx context.Context, url string, userCfg *UserConfigJSON, ...) ([]byte, error)
- func SendWithSeed(ctx context.Context, url string, userCfg *UserConfigJSON, ...) ([]byte, error)
- func SetVerbose(verb bool)
- type PostParams
- type RequestConfigJSON
- type UserConfigJSON
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetResponseBody ¶
func GetResponseBody(url string, postP PostParams) ([]byte, error)
GetResponseBody makes request and extracts body
func Send ¶
func Send(ctx context.Context, url string, userCfg *UserConfigJSON, reqCfg *RequestConfigJSON) ([]byte, error)
Send first gets seed and after that makes target request
func SendWithSeed ¶
func SendWithSeed(ctx context.Context, url string, userCfg *UserConfigJSON, reqCfg *RequestConfigJSON, seed []byte) ([]byte, error)
SendWithSeed sends request with known seed
Types ¶
type RequestConfigJSON ¶
type RequestConfigJSON struct { Params []interface{} `json:"params"` Method string `json:"method"` }
RequestConfigJSON holds info about request
func ReadRequestConfigFromFile ¶
func ReadRequestConfigFromFile(path string) (*RequestConfigJSON, error)
ReadRequestConfigFromFile read request config from file
type UserConfigJSON ¶
type UserConfigJSON struct { PrivateKey string `json:"private_key"` Caller string `json:"caller"` // contains filtered or unexported fields }
UserConfigJSON holds info about user
func CreateUserConfig ¶ added in v0.6.1
func CreateUserConfig(caller string, privKey string) (*UserConfigJSON, error)
CreateUserConfig creates user config from arguments
func ReadUserConfigFromFile ¶
func ReadUserConfigFromFile(path string) (*UserConfigJSON, error)
ReadUserConfigFromFile read user confgi from file
Click to show internal directories.
Click to hide internal directories.