cdsapi

package
v0.0.0-...-03fcf0c Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CUSTOMER_ID = "CUSTOMER_ID"
	USER_ID     = "USER_ID"
)

Variables

View Source
var (
	APIHost         string
	AccessKeyID     string
	AccessKeySecret string
)

Functions

func CdsRespDeal

func CdsRespDeal(ctx context.Context, response *http.Response, action string, data interface{}) (int, error)

func DoOpenApiRequest

func DoOpenApiRequest(ctx context.Context, req *CloudRequest, staggered int) (resp *http.Response, err error)

func DoRequest

func DoRequest(method, url string, body io.Reader) (resp *http.Response, err error)

func IsAccessKeySet

func IsAccessKeySet() bool

func Run

func Run(name string, arg ...string) (string, error)

func Staggered

func Staggered(t int)

Types

type CloudRequest

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

func NewCCKRequest

func NewCCKRequest(ctx context.Context, action, method string, params map[string]string, body interface{}) (*CloudRequest, error)

func NewRequest

func NewRequest(action, method string, params map[string]string, productType string, body interface{}) *CloudRequest

type Response

type Response struct {
	Code    string      `json:"code"`
	Message string      `json:"msg"`
	Data    interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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