core

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package core 为SDK 核心包,包含SDKClient

Index

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

func NewSDKClient(appKey string, secret string) *SDKClient

NewSDKClient 新建SDKClient

func (*SDKClient) DisableSandbox

func (c *SDKClient) DisableSandbox()

DisableSandbox 禁用沙箱环境

func (SDKClient) IsDebug added in v1.2.0

func (c SDKClient) IsDebug() bool

IsDebug 判断是否debug

func (SDKClient) IsSandbox added in v1.2.0

func (c SDKClient) IsSandbox() bool

IsSandbox 判断是否沙箱环境

func (*SDKClient) Post

func (c *SDKClient) Post(req model.IRequest, resp model.IResponse, session string) error

Post 发起请求

func (*SDKClient) SetAPIFormat

func (c *SDKClient) SetAPIFormat(format model.APIFormat)

SetAPIFormat 设置API响应格式

func (*SDKClient) SetDebug

func (c *SDKClient) SetDebug(debug bool)

SetDebug 设置debug

func (*SDKClient) SetSignMethod

func (c *SDKClient) SetSignMethod(method model.SignMethod)

SetSignMethod 设置API签名方法

func (*SDKClient) UseSandbox

func (c *SDKClient) UseSandbox()

UseSandbox 使用沙箱环境

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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