tool

package
Version: v0.0.0-...-d4762d9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToString

func ConvertToString(v interface{}) string

func GetClientAccount

func GetClientAccount() *accounts.Account

func GetClientAddress

func GetClientAddress() string

func GetClientKeystore

func GetClientKeystore() *keystore.KeyStore

func GetClientPrivateKey

func GetClientPrivateKey() string

func GetNonce

func GetNonce() string

func Http_Delete

func Http_Delete(url string, jsonData string) ([]byte, error)

func Http_Get

func Http_Get(url string, queryParams map[string]interface{}) ([]byte, error)

func Http_Get_Direct

func Http_Get_Direct(url string, queryParams map[string]interface{}) (*http.Response, error)

func Http_Post

func Http_Post(url string, jsonData string) ([]byte, error)

func Http_PostFormMultipartForm

func Http_PostFormMultipartForm(urlAddr string, params map[string]string, imgPath string) ([]byte, error)

func Http_PostFormUrlencoded

func Http_PostFormUrlencoded(urlAddr string, params map[string]string) ([]byte, error)

func Http_Put

func Http_Put(url string, jsonData string) ([]byte, error)

func LoadKeystore

func LoadKeystore()

func RecoverPublickeyByEth

func RecoverPublickeyByEth(msg, sig string) (string, error)

func Sign

func Sign(data []byte, privateKey string) (string, error)

func SignByEth

func SignByEth(data []byte, privateKey *ecdsa.PrivateKey) (string, error)

func StructToSignature

func StructToSignature(obj interface{}) (string, error)

func StructToSignatureByExclude

func StructToSignatureByExclude(obj interface{}, excludes ...string) (string, error)

func Verify

func Verify(data []byte, signature, public string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL