gocli

package
v0.0.0-...-acee36d Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

*

  • Copyright 2015 @ z3q.net.
  • name : api.go
  • author : jarryliu
  • date : -- :
  • description :
  • history :

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpCall

func HttpCall(url string, v *url.Values) ([]byte, error)

func HttpCall2Hash

func HttpCall2Hash(url string, v *url.Values) (map[string]interface{}, error)

Http调用并返回Hash

func HttpCall2Message

func HttpCall2Message(url string, v *url.Values) (*gof.Message, error)

Http调用并反序列化为消息

func HttpCall2Object

func HttpCall2Object(url string, v *url.Values, dst interface{}) error

Http调用并反序列化为对象

Types

type ApiCli

type ApiCli struct {
	// contains filtered or unexported fields
}

API客户端,server地址通常是:http://xxx.com:1003/go2o_api_v1

func NewApiClient

func NewApiClient(server, partnerId, secret string) *ApiCli

func (*ApiCli) GetBytes

func (this *ApiCli) GetBytes(action string, v url.Values) ([]byte, error)

func (*ApiCli) GetMessage

func (this *ApiCli) GetMessage(action string, v url.Values) (*gof.Message, error)

func (*ApiCli) GetObject

func (this *ApiCli) GetObject(action string, v url.Values, dst interface{}) error

Jump to

Keyboard shortcuts

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