Documentation ¶
Overview ¶
Package core 核心方法
Index ¶
- Constants
- type SDKClient
- func (c *SDKClient) Get(accessToken string, req model.GetRequest, resp interface{}) error
- func (c *SDKClient) GetBytes(accessToken string, req model.GetRequest) ([]byte, error)
- func (c *SDKClient) GetOnBody(accessToken string, req model.PostRequest, resp interface{}) error
- func (c *SDKClient) GetUrl(req model.GetRequest) string
- func (c *SDKClient) Password() string
- func (c *SDKClient) Post(req model.PostRequest, resp interface{}) error
- func (c *SDKClient) Post2(req model.PostRequest, resp *[][]string) error
- func (c *SDKClient) PostUrl(req model.PostRequest) string
- func (c *SDKClient) SetDebug(debug bool)
- func (c *SDKClient) SetHttpClient(client *http.Client)
- func (c *SDKClient) Token() string
- func (c *SDKClient) Upload(accessToken string, req model.UploadRequest, resp interface{}) error
- func (c *SDKClient) UploadUrl(req model.UploadRequest) string
- func (c *SDKClient) Username() string
Constants ¶
View Source
const (
// BASE_URL api gateway
BASE_URL = "https://e.uc.cn/shc"
)
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(accessToken string, req model.GetRequest, resp interface{}) error
Get execute get api request
func (*SDKClient) GetOnBody ¶
func (c *SDKClient) GetOnBody(accessToken string, req model.PostRequest, resp interface{}) error
func (*SDKClient) Post ¶
func (c *SDKClient) Post(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 ¶
func (*SDKClient) Upload ¶
func (c *SDKClient) Upload(accessToken string, req model.UploadRequest, resp interface{}) error
Upload multipart/form-data post
Click to show internal directories.
Click to hide internal directories.