Documentation ¶
Overview ¶
Package core 为SDK 核心包,包含SDKClient
Index ¶
- Constants
- type Otel
- type SDKClient
- func (c *SDKClient) DisableSandbox()
- func (c SDKClient) IsDebug() bool
- func (c SDKClient) IsSandbox() bool
- func (c *SDKClient) Post(ctx context.Context, req model.IRequest, resp model.IResponse, session string) error
- func (c *SDKClient) SetAPIFormat(format model.APIFormat)
- func (c *SDKClient) SetDebug(debug bool)
- func (c *SDKClient) SetGateway(gateway string)
- func (c *SDKClient) SetSignMethod(method model.SignMethod)
- func (c *SDKClient) UseSandbox()
- func (c *SDKClient) WithSpan(ctx context.Context, methodName string, req *http.Request, ...) error
- func (c *SDKClient) WithTracer(namespace string)
Constants ¶
View Source
const ( // PRODUCT_GATEWAY 生产环境HTTPS地址 PRODUCT_GATEWAY = "https://eco.taobao.com/router/rest" // SANDBOX_GATEWAY 箱环境HTTPS地址 SANDBOX_GATEWAY = "https://gw.api.tbsandbox.com/router/rest" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SDKClient ¶
type SDKClient struct {
// contains filtered or unexported fields
}
SDKClient 结构体
func NewSDKClient ¶
NewSDKClient 新建SDKClient
func (*SDKClient) Post ¶
func (c *SDKClient) Post(ctx context.Context, req model.IRequest, resp model.IResponse, session string) error
Post 发起请求
func (*SDKClient) SetAPIFormat ¶
SetAPIFormat 设置API响应格式
func (*SDKClient) SetGateway ¶ added in v1.3.5
SetGateway 设置gateway
func (*SDKClient) SetSignMethod ¶
func (c *SDKClient) SetSignMethod(method model.SignMethod)
SetSignMethod 设置API签名方法
func (*SDKClient) WithTracer ¶ added in v1.4.0
Click to show internal directories.
Click to hide internal directories.