cmdbutils

package module
v0.0.0-...-4118d9f Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: MIT Imports: 14 Imported by: 0

README

cmdb-utils

cmdb utils

初始化http客户端
client := cmdbutils.InitClient("xxx.cmdb.com")
关闭http客户端
cmdbutils.Close(client)
post
cmdbutils.CmdbPost(uri string, data map[string]interface{}, ak string, sk string, client *resty.Client, statusCode *int, body *[]byte) error
  • uri: 调用路径
  • data:post 请求体
  • ak:cmdb ak
  • sk:cmdb sk
  • client: http客户端
  • statusCode: http状态码
  • body: http response body字节码
delete
cmdbutils.CmdbDelete(uri string, data map[string]string, ak string, sk string, client *resty.Client, statusCode *int, body *[]byte) error
  • uri: 调用路径
  • data:delete 参数
  • ak:cmdb ak
  • sk:cmdb sk
  • client: http客户端
  • statusCode: http状态码
  • body: http response body字节码

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(client *resty.Client)

Close 关闭http连接

func CmdbDelete

func CmdbDelete(uri string, data map[string]string, ak string, sk string, client *resty.Client, statusCode *int, body *[]byte) error

func CmdbPost

func CmdbPost(uri string, data map[string]interface{}, ak string, sk string, client *resty.Client, statusCode *int, body *[]byte) error

func GenSignature

func GenSignature(accessKey string, secretKey string, requestTime int64,
	method string, uri string, params map[string]string, data map[string]interface{}, signature *string) error

GenSignature 生成签名

func InitClient

func InitClient(domain string) *resty.Client

InitClient 初始化http 客户端

Types

This section is empty.

Jump to

Keyboard shortcuts

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