Documentation
¶
Overview ¶
Package core 核心方法
Index ¶
- Constants
- type Otel
- type SDKClient
- func (c *SDKClient) AppID() uint64
- func (c *SDKClient) Get(ctx context.Context, accessToken string, req model.GetRequest, ...) error
- func (c *SDKClient) GetBytes(ctx context.Context, accessToken string, req model.GetRequest) ([]byte, error)
- func (c *SDKClient) GetOnBody(ctx context.Context, accessToken string, req model.PostRequest, ...) error
- func (c *SDKClient) GetUrl(req model.GetRequest) string
- func (c *SDKClient) Post(ctx context.Context, accessToken string, req model.PostRequest, ...) error
- func (c *SDKClient) PostUrl(req model.PostRequest) string
- func (c *SDKClient) Secret() string
- func (c *SDKClient) SetDebug(debug bool)
- func (c *SDKClient) SetHttpClient(client *http.Client)
- func (c *SDKClient) Upload(ctx context.Context, accessToken string, req model.UploadRequest, ...) error
- func (c *SDKClient) UploadUrl(req model.UploadRequest) string
- func (c *SDKClient) WithSpan(ctx context.Context, req *http.Request, resp interface{}, payload []byte, ...) error
- func (c *SDKClient) WithTracer(namespace string)
Constants ¶
View Source
const ( // BASE_URL api gateway BASE_URL = "https://ad.e.kuaishou.com/rest/openapi" // OAUTH_URL oauth gateway OAUTH_URL = "https://developers.e.kuaishou.com" // ACTIVATE_URL 上报地址 ACTIVATE_URL = "http://ad.partner.gifshow.com/track/activate" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SDKClient ¶
type SDKClient struct {
// contains filtered or unexported fields
}
SDKClient api client
func NewSDKClient ¶
NewSDKClient init sdk client
func (*SDKClient) Get ¶
func (c *SDKClient) Get(ctx context.Context, accessToken string, req model.GetRequest, resp interface{}) error
Get execute get api request
func (*SDKClient) GetBytes ¶ added in v1.3.0
func (c *SDKClient) GetBytes(ctx context.Context, accessToken string, req model.GetRequest) ([]byte, error)
GetBytes get bytes api
func (*SDKClient) Post ¶
func (c *SDKClient) Post(ctx context.Context, accessToken string, req model.PostRequest, resp interface{}) error
Post execute post api request
func (*SDKClient) PostUrl ¶
func (c *SDKClient) PostUrl(req model.PostRequest) string
PostUrl post请求地址
func (*SDKClient) SetHttpClient ¶ added in v1.2.8
func (*SDKClient) Upload ¶ added in v1.0.5
func (c *SDKClient) Upload(ctx context.Context, accessToken string, req model.UploadRequest, resp interface{}) error
Upload multipart/form-data post
func (*SDKClient) UploadUrl ¶ added in v1.0.5
func (c *SDKClient) UploadUrl(req model.UploadRequest) string
UploadUrl post multipart/form-data请求地址
func (*SDKClient) WithTracer ¶ added in v1.9.6
Click to show internal directories.
Click to hide internal directories.