api_error_code

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package api_error_code defines stable business errors returned by API methods.

Index

Constants

View Source
const (
	Success = 0

	MethodNotFound           = 10001
	MethodNotSupported       = 10002
	InvalidArguments         = 10003
	PermissionDenied         = 10004
	VerifyCodeDeliveryFailed = 10005
)

Variables

View Source
var (
	ErrMethodNotFound = &Error{
		Code:    MethodNotFound,
		Message: "method not found",
	}
	ErrMethodNotSupported = &Error{
		Code:    MethodNotSupported,
		Message: "method is not supported",
	}
	ErrInvalidArguments = &Error{
		Code:    InvalidArguments,
		Message: "invalid arguments",
	}
	ErrPermissionDenied = &Error{
		Code:    PermissionDenied,
		Message: "permission denied",
	}
	ErrVerifyCodeDeliveryFailed = &Error{
		Code:    VerifyCodeDeliveryFailed,
		Message: "verification code delivery failed",
	}
)

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    int
	Message string
}

func As

func As(err error) (*Error, bool)

func (*Error) Error

func (err *Error) Error() string

Jump to

Keyboard shortcuts

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