Documentation ¶
Overview ¶
Copyright 2015 Beijing Venusource Tech.Co.Ltd. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
封装了http调用相关的一些方法
Index ¶
- func CallApiServer(server string, signer *signer.SHA1Signer, params *OrderedParams, i interface{}) error
- func Escape(s string) string
- func RemoveNetworkRouter(server string, user string, password string, os string) error
- type ErrorResponse
- type HTTPExecuteError
- type OrderedParams
- func (o *OrderedParams) Add(key, value string)
- func (o *OrderedParams) AddUnescaped(key, value string)
- func (o *OrderedParams) Clone() *OrderedParams
- func (o *OrderedParams) Get(key string) string
- func (o *OrderedParams) Keys() []string
- func (o *OrderedParams) Len() int
- func (o *OrderedParams) Less(i int, j int) bool
- func (o *OrderedParams) Swap(i int, j int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallApiServer ¶
func CallApiServer(server string, signer *signer.SHA1Signer, params *OrderedParams, i interface{}) error
调用API
Types ¶
type ErrorResponse ¶
type ErrorResponse struct { RequestId string `json:"RequestId"` //请求ID HostId string `json:"HostId"` //服务器HOSTID Code string `json:"Code"` //错误代码 Message string `json:"Message"` //错误信息 }
API调用错误返回对象
type HTTPExecuteError ¶
type HTTPExecuteError struct { // Request Header RequestHeaders string // Response BodyBytes ResponseBodyBytes []byte // Status Status string // StatusCode StatusCode int }
HTTP请求错误信息
type OrderedParams ¶
type OrderedParams struct {
// contains filtered or unexported fields
}
排序后的参数列表
func NewOrderedParams ¶
func NewOrderedParams() *OrderedParams
func (*OrderedParams) Add ¶
func (o *OrderedParams) Add(key, value string)
func (*OrderedParams) AddUnescaped ¶
func (o *OrderedParams) AddUnescaped(key, value string)
func (*OrderedParams) Clone ¶
func (o *OrderedParams) Clone() *OrderedParams
func (*OrderedParams) Get ¶
func (o *OrderedParams) Get(key string) string
func (*OrderedParams) Keys ¶
func (o *OrderedParams) Keys() []string
func (*OrderedParams) Len ¶
func (o *OrderedParams) Len() int
func (*OrderedParams) Swap ¶
func (o *OrderedParams) Swap(i int, j int)
Click to show internal directories.
Click to hide internal directories.