• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang gaehttpjsonrpc.CallWithBasicAuth函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中gaehttpjsonrpc.CallWithBasicAuth函数的典型用法代码示例。如果您正苦于以下问题:Golang CallWithBasicAuth函数的具体用法?Golang CallWithBasicAuth怎么用?Golang CallWithBasicAuth使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了CallWithBasicAuth函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: GetGenerate

func GetGenerate(c appengine.Context, id interface{}) (map[string]interface{}, os.Error) {
	//Returns true or false whether bitcoind is currently generating hashes
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "getgenerate", id, nil)
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例2: WalletPassPhrase

func WalletPassPhrase(c appengine.Context, id interface{}, passphrase, timeout interface{}) (map[string]interface{}, os.Error) {
	//Stores the wallet decryption key in memory for <timeout> seconds.
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "walletpassphrase", id, []interface{}{passphrase, timeout})
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例3: GetAccountAddress

func GetAccountAddress(c appengine.Context, id interface{}, account []interface{}) (map[string]interface{}, os.Error) {
	//Returns the current bitcoin address for receiving payments to this account.
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "getaccountaddress", id, account)
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例4: Stop

func Stop(c appengine.Context, id interface{}) (map[string]interface{}, os.Error) {
	//Stop bitcoin server.
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "stop", id, nil)
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例5: VerifyMessage

func VerifyMessage(c appengine.Context, id interface{}, signature, message interface{}) (map[string]interface{}, os.Error) {
	//Verify a signed message.
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "verifymessage", id, []interface{}{signature, message})
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例6: SetAccount

func SetAccount(c appengine.Context, id interface{}, data []interface{}) (map[string]interface{}, os.Error) {
	//Sets the account associated with the given address. Assigning address that is already assigned to the same account will create a new address associated with that account.
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "setaccount", id, data)
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例7: GetAccount

func GetAccount(c appengine.Context, id interface{}, bitcoinaddress []interface{}) (map[string]interface{}, os.Error) {
	//Returns the account associated with the given address.
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "getaccount", id, bitcoinaddress)
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例8: GetReceivedByAddress

func GetReceivedByAddress(c appengine.Context, id interface{}, data []interface{}) (map[string]interface{}, os.Error) {
	//Returns the total amount received by <bitcoinaddress> in transactions with at least [minconf] confirmations. While some might consider this obvious, value reported by this only considers *receiving* transactions. It does not check payments that have been made *from* this address. In other words, this is not "getaddressbalance".
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "getreceivedbyaddress", id, data)
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例9: Help

func Help(c appengine.Context, id interface{}, command string) (map[string]interface{}, os.Error) {
	//List commands, or get help for a command.
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "help", id, []interface{}{command})
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例10: BackupWallet

func BackupWallet(c appengine.Context, id interface{}, destination []interface{}) (map[string]interface{}, os.Error) {
	//Safely copies wallet.dat to destination, which can be a directory or a path with filename.
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "backupwallet", id, destination)
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例11: GetReceivedByAccount

func GetReceivedByAccount(c appengine.Context, id interface{}, data []interface{}) (map[string]interface{}, os.Error) {
	//Returns the total amount received by addresses with [account] in transactions with at least [minconf] confirmations. If [account] not provided return will include all transactions to all accounts. (version 0.3.24-beta)
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "getreceivedbyaccount", id, data)
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例12: GetNewAddress

func GetNewAddress(c appengine.Context, id interface{}, account []interface{}) (map[string]interface{}, os.Error) {
	//Returns a new bitcoin address for receiving payments. If [account] is specified (recommended), it is added to the address book so payments received with the address will be credited to [account].
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "getnewaddress", id, account)
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例13: GetInfo

func GetInfo(c appengine.Context, id interface{}) (map[string]interface{}, os.Error) {
	//Returns an object containing various state info.
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "getinfo", id, nil)
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例14: GetHashesPerSec

func GetHashesPerSec(c appengine.Context, id interface{}) (map[string]interface{}, os.Error) {
	//Returns a recent hashes per second performance measurement while generating.
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "gethashespersec", id, nil)
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例15: SendMany

func SendMany(c appengine.Context, id interface{}, data []interface{}) (map[string]interface{}, os.Error) {
	//amounts are double-precision floating point numbers
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "sendmany", id, data)
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例16: KeyPoolRefill

func KeyPoolRefill(c appengine.Context, id interface{}) (map[string]interface{}, os.Error) {
	//Fills the keypool, requires wallet passphrase to be set.
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "keypoolrefill", id, nil)
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例17: SendToAddress

func SendToAddress(c appengine.Context, id interface{}, data []interface{}) (map[string]interface{}, os.Error) {
	//<amount> is a real and is rounded to 8 decimal places. Returns the transaction ID <txid> if successful.
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "sendtoaddress", id, data)
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例18: ListAccounts

func ListAccounts(c appengine.Context, id interface{}, minconf interface{}) (map[string]interface{}, os.Error) {
	//Returns Object that has account names as keys, account balances as values.
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "listaccounts", id, []interface{}{minconf})
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例19: SetTxFee

func SetTxFee(c appengine.Context, id interface{}, amount []interface{}) (map[string]interface{}, os.Error) {
	//<amount> is a real and is rounded to the nearest 0.00000001
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "settxfee", id, amount)
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go


示例20: ListSinceBlock

func ListSinceBlock(c appengine.Context, id interface{}, blockid, targetconfirmations interface{}) (map[string]interface{}, os.Error) {
	//Get all transactions in blocks since block [blockid], or all transactions if omitted.
	resp, err := gaehttpjsonrpc.CallWithBasicAuth(c, Address, Username, Password, true, "listsinceblock", id, []interface{}{blockid, targetconfirmations})
	if err != nil {
		log.Println(err)
		return resp, err
	}
	result := resp["result"]
	log.Println(result)

	return resp, err
}
开发者ID:postfix,项目名称:Go-HTTP-JSON-RPC,代码行数:12,代码来源:GAEBitcoinJSONClient.go



注:本文中的gaehttpjsonrpc.CallWithBasicAuth函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang websocket.Conn类代码示例发布时间:2022-05-24
下一篇:
Golang metric.Metric类代码示例发布时间:2022-05-24
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap