core

package
v0.0.0-...-4c075ac Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package core 核心方法

Index

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

func NewSDKClient(username string, password string, token string) *SDKClient

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) GetBytes

func (c *SDKClient) GetBytes(accessToken string, req model.GetRequest) ([]byte, error)

GetBytes get bytes api

func (*SDKClient) GetOnBody

func (c *SDKClient) GetOnBody(accessToken string, req model.PostRequest, resp interface{}) error

func (*SDKClient) GetUrl

func (c *SDKClient) GetUrl(req model.GetRequest) string

GetUrl get请求地址

func (*SDKClient) Password

func (c *SDKClient) Password() string

func (*SDKClient) Post

func (c *SDKClient) Post(req model.PostRequest, resp interface{}) error

Post execute post api request

func (*SDKClient) Post2

func (c *SDKClient) Post2(req model.PostRequest, resp *[][]string) error

func (*SDKClient) PostUrl

func (c *SDKClient) PostUrl(req model.PostRequest) string

PostUrl post请求地址

func (*SDKClient) SetDebug

func (c *SDKClient) SetDebug(debug bool)

SetDebug set debug mode

func (*SDKClient) SetHttpClient

func (c *SDKClient) SetHttpClient(client *http.Client)

func (*SDKClient) Token

func (c *SDKClient) Token() string

func (*SDKClient) Upload

func (c *SDKClient) Upload(accessToken string, req model.UploadRequest, resp interface{}) error

Upload multipart/form-data post

func (*SDKClient) UploadUrl

func (c *SDKClient) UploadUrl(req model.UploadRequest) string

UploadUrl post multipart/form-data请求地址

func (*SDKClient) Username

func (c *SDKClient) Username() string

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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