Documentation ¶
Overview ¶
Package doapi : DO APIクライアントモジュール
Index ¶
- Constants
- func ArgumentList(arg protocol.CommonArg) (required, optional []string)
- func ArgumentListType(arg protocol.CommonArg) (toURI, toQuery, toJSON []string)
- func Call(api API, arg protocol.CommonArg, resp interface{}) (err error)
- func CallWithMap(api API, name string, data map[string]string, resp map[string]interface{}) error
- func CustomEscape(v string) string
- func GetBody(arg protocol.CommonArg) string
- func GetParam(api API, arg protocol.CommonArg) *url.URL
- func GetPath(arg protocol.CommonArg) string
- func String2Sign(method string, header http.Header, param url.URL) string
- func Validate(arg protocol.CommonArg) error
- func ValidateMap(name string, data map[string]string) error
- type API
Constants ¶
View Source
const ( HmacSHA1 = "HmacSHA1" HmacSHA256 = "HmacSHA256" SignatureVersion2 = "2" APIVersion = "20140601" EndpointJSON = "https://do.api.iij.jp/" // EndpointJSON = "http://localhost:9999/" TimeLayout = "2006-01-02T15:04:05Z" PostContentType = "application/json" )
Variables ¶
This section is empty.
Functions ¶
func ArgumentList ¶
ArgumentList API引数のリストを求める。必須とオプションに分類
func ArgumentListType ¶
ArgumentListType API引数のリストを求める。URI埋め込み、クエリストリング、JSONに分類
func CallWithMap ¶
CallWithMap API呼び出しを実行する。引数と戻り値が構造体ではなくmap
func String2Sign ¶
String2Sign get string to calculate signature
Types ¶
type API ¶
type API struct { AccessKey string SecretKey string Endpoint string SignMethod string Expires time.Duration Insecure bool }
API の呼び出し先に関連する構造
Click to show internal directories.
Click to hide internal directories.