apiError

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: AGPL-3.0 Imports: 3 Imported by: 2

README

apiError-go

apiErrors that using across based on Cellularhacker's Codes written in Go.

Usage

  • How to import?
    go get -u github.com/Cellularhacker/apiError-go
    

※ Important

  • package name is just apiError. so you have to use like apiError.Error, not apiError-go.Error.

Documentation

Index

Constants

View Source
const (
	UnknownServerError                 = 5000
	Unauthorized                       = 5001
	EmailAlreadyRegistered             = 5002
	PasswordLessThanRequired           = 5003
	SomethingMissing                   = 5004
	WrongConfirmationCode              = 5005
	WrongAccessToken                   = 5006
	EmailNotRegistered                 = 5007
	EmailAlreadyConfirmed              = 5008
	WrongPassword                      = 5009
	DuplicateAPIKey                    = 5010
	WrongEmailOrPassword               = 5011
	NameAlreadyRegistered              = 5012
	UserDeleted                        = 5013
	ContentMissing                     = 5014
	NoLeaguePresent                    = 5015
	CantUnfollowLOT                    = 5016
	ReferralCodeMissing                = 5017
	EmailBelongsToAnotherAccount       = 5018
	PhoneNumberBelongsToAnotherAccount = 5019

	BotBalanceLessThanMinimum = 5031
	BotKeyCantDelete          = 5032
	BotCompanyError           = 5033
	BotDoesntExistError       = 5034

	FunctionNotSupportedYetForGivenExchange = 5035
	InvoicePaymentVerifyUnknownError        = 5036
	KeyHasNoPermissionForGivenOperation     = 5037

	LeagueRegisterByPassed      = 5040
	LeagueMinimumBalanceNotMet  = 5041
	LeagueRemovedDueToKeyDelete = 5042

	ErrorBotRatioDifferenceHigh      = 6001
	ErrorBotCopyingKeyInvalidated    = 6002
	ErrorBotOriginalKeyInvalidated   = 6003
	ErrorBotPositionMismatch         = 6004
	ErrorBotUnknown                  = 6005
	ErrorBotOpenOrderFound           = 6006
	ErrorKeyIsRegisteredInAnotherBot = 6007
	ErrorKeyIsNotCopyLeader          = 6008
	ErrorCopyLeaderConditionsNotMet  = 6009
	ErrorBotBalanceNotSufficient     = 6010
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Error   error
	Message string
	Code    int
}

Error APIError error returned by APIHandler

func BadRequestError

func BadRequestError(location string) *Error

func BadRequestMsgErr

func BadRequestMsgErr(msg string) *Error

func ConflictError

func ConflictError(message string) *Error

func DetectError

func DetectError(err error) *Error

func InternalServerError

func InternalServerError(err error) *Error

func InternalServerErrorLoc

func InternalServerErrorLoc(loc string, err error) *Error

func New

func New(message string, code int) *Error

func NotAuthorizedError

func NotAuthorizedError(message string) *Error

func NotAuthorizedUser

func NotAuthorizedUser() *Error

func NotFoundError

func NotFoundError(message string) *Error

func SomethingMissingError

func SomethingMissingError(message string) *Error

func UnavailableLegalReason

func UnavailableLegalReason(message string) *Error

Jump to

Keyboard shortcuts

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