Documentation ¶
Overview ¶
Package core 包含SDKClient
Index ¶
- Constants
- type Otel
- type SDKClient
- func (c *SDKClient) ClientID() string
- func (c *SDKClient) Do(ctx context.Context, req model.Request, resp model.Response, ...) error
- func (c *SDKClient) SetDataType(t model.RequestDataType)
- func (c *SDKClient) SetDebug(debug bool)
- func (c *SDKClient) SetGateway(gw string)
- func (c *SDKClient) SetHttpClient(client *http.Client)
- func (c *SDKClient) SetUploadGateway(gw string)
- func (c *SDKClient) Upload(ctx context.Context, req model.UploadRequest, resp model.Response, ...) error
- func (c *SDKClient) WSSUrl() string
- func (c *SDKClient) WithSpan(ctx context.Context, methodName string, req *http.Request, resp model.Response, ...) error
- func (c *SDKClient) WithTracer(namespace string)
Constants ¶
View Source
const ( // GATEWAY 默认APIgateway GATEWAY = "https://gw-api.pinduoduo.com/api/router" // UPLOAD GATEWAY UPLOAD_GATEWAY = "https://gw-upload.pinduoduo.com/api/upload" // WSSEndPoint wws endpoint WSSEndPoint = "wss://message-api.pinduoduo.com/message" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SDKClient ¶
type SDKClient struct {
// contains filtered or unexported fields
}
SDKClient sdk client
func NewSDKClient ¶
NewSDKClient 创建SDKClient
func (*SDKClient) SetDataType ¶
func (c *SDKClient) SetDataType(t model.RequestDataType)
SetDataType 设置返回数据格式
func (*SDKClient) SetHttpClient ¶ added in v1.2.5
SetHttpClient 设置http.Client
func (*SDKClient) SetUploadGateway ¶ added in v1.1.6
func (*SDKClient) WithTracer ¶ added in v1.2.5
Click to show internal directories.
Click to hide internal directories.