コード例 #1
0
func ShipItem(endpoint string, item string, user string, quantity uint64, timestamp string) (string, error) {
	return services.Http_post_string("http://"+endpoint+"/item/"+item+"/ship",
		url.Values{
			"user": []string{user},
			"qty":  []string{fmt.Sprintf("%v", quantity)},
			"ts":   []string{timestamp},
		})
}
コード例 #2
0
func CreatePayment(endpoint string, user string, value float64, timestamp string) (string, error) {
	return services.Http_post_string("http://"+endpoint+"/payment",
		url.Values{
			"user":  []string{user},
			"value": []string{fmt.Sprintf("%v", value)},
			"ts":    []string{timestamp},
		})
}
コード例 #3
0
func PlaceOrder(shopEndpoint string, user string, item string, quantity int64) (string, error) {
	return services.Http_post_string("http://"+shopEndpoint+"/order",
		url.Values{
			"user": []string{user},
			"item": []string{item},
			"qty":  []string{fmt.Sprintf("%v", quantity)},
		})
}