base

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package base universal tool package

Package base universal tool package

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrConfigNotFound config didn't find
	ErrConfigNotFound = Error{
		ErrCode: 10404,
		ErrMsg:  "config not found",
	}

	// ErrRequestIsEmpty request is empty
	ErrRequestIsEmpty = Error{
		ErrCode: 10404,
		ErrMsg:  "request is empty",
	}

	ErrClientTokenIsEmpty = Error{
		ErrCode: 10404,
		ErrMsg:  "client token is empty",
	}

	ErrClientAccessTokenIsEmpty = Error{
		ErrCode: 10404,
		ErrMsg:  "client access token is empty",
	}
)

Functions

func ErrConfigKeyValueEmpty

func ErrConfigKeyValueEmpty(key string) error

ErrConfigKeyValueEmpty params key not found

func ErrParamKeyValueEmpty added in v0.0.9

func ErrParamKeyValueEmpty(key string) error

ErrParamKeyValueEmpty params key not found

Types

type CommonError

type CommonError struct {
	ErrCode int64  `json:"error_code"`
	ErrMsg  string `json:"description"`
}

CommonError 抖音返回的通用错误。

type CommonErrorExtra

type CommonErrorExtra struct {
	LogID string `json:"logid"`
	Now   int64  `json:"now"`
}

CommonErrorExtra 抖音返回的错误额外信息。

type CommonResponse added in v0.0.2

type CommonResponse struct {
	ErrMsg string `json:"err_msg"`
	LogID  string `json:"log_id"`
	ErrNo  int    `json:"err_no"`
}

CommonResponse 抖音返回的通用错误。

type Error

type Error struct {
	ErrCode int    `json:"errCode"`
	ErrMsg  string `json:"errMsg"`
	Err     error  `json:"err"`
}

Error base error

func (Error) Error

func (e Error) Error() string

String return the error string

Jump to

Keyboard shortcuts

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