class100

package module
v1.1.6 Latest Latest
Warning

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

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

README

sdk-go(100课堂Golang版本SDK)

用于Golang开发时的SDK调用,简化代码

功能

  • 打包
  • 通知

Documentation

Index

Constants

View Source
const (
	// MaxRetryTimes 最大重试次数
	MaxRetryTimes int = 10
	// DefaultRetryTimes 默认重试次数
	DefaultRetryTimes int = 3
)
View Source
const (
	// TagPackageWindows 用于Windows打包
	TagPackageWindows string = "package-windows"
	// TagPackageMac 用于Mac打包
	TagPackageMac string = "package-mac"
	// TagPackageAndroid 用于Android打包
	TagPackageAndroid string = "package-android"
	// TagPackageIOS 用于iOS打包
	TagPackageIOS string = "package-ios"

	// TagNotify 用于通知
	TagNotify string = "notify"
)
View Source
const (
	// ApiNotifyCreate 创建通知
	ApiNotifyCreate string = "notifies"
)
View Source
const (
	// ErrorCodeValidate 数据验证错误
	ErrorCodeValidate gox.ErrorCode = 401
)

Variables

This section is empty.

Functions

func NewResty

func NewResty() *resty.Request

NewResty Resty客户端

func RestyStringBody

func RestyStringBody(rsp *resty.Response) string

RestyStringBody 字符串形式的结果

Types

type ApiVersion

type ApiVersion string

ApiVersion API版本

const (
	// ApiVersionDefault 默认版本
	ApiVersionDefault ApiVersion = "default"
	// ApiVersionV1 V1版本
	ApiVersionV1 ApiVersion = "v1"
	// ApiVersionV2 V2版本
	ApiVersionV2 ApiVersion = "v2"
)

type Client

type Client struct {
	// 授权
	AccessKey string `json:"accessKey"`
	SecretKey string `json:"secretKey"`
}

Client 客户端

func (Client) String

func (c Client) String() string

type Request

type Request struct {
	// Environment 环境类型
	Environment core.Environment `json:"environment" validate:"required,oneof=dev test prod local simulation"`
}

Request 请求

func (Request) String

func (r Request) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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