errorv1

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERROR_name = map[int32]string{
		0: "UNKNOWN",
	}
	ERROR_value = map[string]int32{
		"UNKNOWN": 0,
	}
)

Enum value maps for ERROR.

View Source
var ERROR_http_code = map[string]int{

	"UNKNOWN": 500,
}
View Source
var File_api_uuid_service_v1_errors_uuid_error_v1_proto protoreflect.FileDescriptor

Functions

func DefaultErrorUnknown

func DefaultErrorUnknown() *errors.Error

未知错误

func ErrorUnknown

func ErrorUnknown(format string, args ...interface{}) *errors.Error

未知错误

func IsUnknown

func IsUnknown(err error) bool

未知错误

Types

type ERROR

type ERROR int32

ERROR 复用node_id的错误码,详情请查看node_id的错误码;统一在node_id定义

const (
	ERROR_UNKNOWN ERROR = 0 // 未知错误
)

func (ERROR) Descriptor

func (ERROR) Descriptor() protoreflect.EnumDescriptor

func (ERROR) Enum

func (x ERROR) Enum() *ERROR

func (ERROR) EnumDescriptor deprecated

func (ERROR) EnumDescriptor() ([]byte, []int)

Deprecated: Use ERROR.Descriptor instead.

func (ERROR) HTTPCode

func (x ERROR) HTTPCode() int

func (ERROR) Number

func (x ERROR) Number() protoreflect.EnumNumber

func (ERROR) String

func (x ERROR) String() string

func (ERROR) Type

func (ERROR) Type() protoreflect.EnumType

type README

type README struct {

	// error 复用node_id的错误码,详情请查看node_id的错误码;统一在node_id定义
	Error errors.ERROR `protobuf:"varint,1,opt,name=error,proto3,enum=saas.api.nodeid.errorv1.ERROR" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*README) Descriptor deprecated

func (*README) Descriptor() ([]byte, []int)

Deprecated: Use README.ProtoReflect.Descriptor instead.

func (*README) GetError

func (x *README) GetError() errors.ERROR

func (*README) ProtoMessage

func (*README) ProtoMessage()

func (*README) ProtoReflect

func (x *README) ProtoReflect() protoreflect.Message

func (*README) Reset

func (x *README) Reset()

func (*README) String

func (x *README) String() string

func (*README) Validate

func (m *README) Validate() error

Validate checks the field values on README with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*README) ValidateAll

func (m *README) ValidateAll() error

ValidateAll checks the field values on README with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in READMEMultiError, or nil if none found.

type READMEMultiError

type READMEMultiError []error

READMEMultiError is an error wrapping multiple validation errors returned by README.ValidateAll() if the designated constraints aren't met.

func (READMEMultiError) AllErrors

func (m READMEMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (READMEMultiError) Error

func (m READMEMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type READMEValidationError

type READMEValidationError struct {
	// contains filtered or unexported fields
}

READMEValidationError is the validation error returned by README.Validate if the designated constraints aren't met.

func (READMEValidationError) Cause

func (e READMEValidationError) Cause() error

Cause function returns cause value.

func (READMEValidationError) Error

func (e READMEValidationError) Error() string

Error satisfies the builtin error interface

func (READMEValidationError) ErrorName

func (e READMEValidationError) ErrorName() string

ErrorName returns error name.

func (READMEValidationError) Field

func (e READMEValidationError) Field() string

Field function returns field value.

func (READMEValidationError) Key

func (e READMEValidationError) Key() bool

Key function returns key value.

func (READMEValidationError) Reason

func (e READMEValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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