base

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 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 not found
	ErrConfigNotFound = Error{
		ErrCode: 10404,
		ErrMsg:  "config not found",
	}
)

Functions

func ErrConfigKeyValueEmpty

func ErrConfigKeyValueEmpty(key string) error

ErrConfigKeyValueEmpty 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