basepb

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthBase        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBase          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBase = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthError        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowError          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupError = fmt.Errorf("proto: unexpected end of group")
)
View Source
var E_ErrorInfo = &proto.ExtensionDesc{
	ExtendedType:  (*descriptorpb.EnumValueOptions)(nil),
	ExtensionType: (*ErrorInfo)(nil),
	Field:         50001,
	Name:          "basepb.error_info",
	Tag:           "bytes,50001,opt,name=error_info",
	Filename:      "error.proto",
}
View Source
var ErrorType_name = map[int32]string{
	0: "ETNo",
	1: "ETNormal",
	2: "ETProtocol",
	3: "ETPanic",
	4: "ETDataBase",
	5: "ETNoAuth",
}
View Source
var ErrorType_value = map[string]int32{
	"ETNo":       0,
	"ETNormal":   1,
	"ETProtocol": 2,
	"ETPanic":    3,
	"ETDataBase": 4,
	"ETNoAuth":   5,
}

Functions

This section is empty.

Types

type ErrorInfo

type ErrorInfo struct {
	TipName   string `protobuf:"bytes,1,opt,name=tip_name,json=tipName,proto3" json:"tip_name,omitempty"`
	TipDesc   string `protobuf:"bytes,2,opt,name=tip_desc,json=tipDesc,proto3" json:"tip_desc,omitempty"`
	ErrorCode int64  `protobuf:"varint,3,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
}

just for error define and code generate

func (*ErrorInfo) Descriptor

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

func (*ErrorInfo) GetErrorCode

func (m *ErrorInfo) GetErrorCode() int64

func (*ErrorInfo) GetTipDesc

func (m *ErrorInfo) GetTipDesc() string

func (*ErrorInfo) GetTipName

func (m *ErrorInfo) GetTipName() string

func (*ErrorInfo) GoString added in v0.1.5

func (m *ErrorInfo) GoString() string

func (*ErrorInfo) Marshal added in v0.1.5

func (m *ErrorInfo) Marshal() (dAtA []byte, err error)

func (*ErrorInfo) MarshalEasyJSON added in v0.1.6

func (m *ErrorInfo) MarshalEasyJSON(w *github_com_mailru_easyjson_jwriter.Writer)

func (*ErrorInfo) MarshalJSON added in v0.1.5

func (m *ErrorInfo) MarshalJSON() ([]byte, error)

func (*ErrorInfo) MarshalTo added in v0.1.5

func (m *ErrorInfo) MarshalTo(dAtA []byte) (int, error)

func (*ErrorInfo) MarshalToSizedBuffer added in v0.1.5

func (m *ErrorInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ErrorInfo) MarshalZerologObject added in v0.1.6

func (m *ErrorInfo) MarshalZerologObject(e *zerolog.Event)

func (*ErrorInfo) ProtoMessage

func (*ErrorInfo) ProtoMessage()

func (*ErrorInfo) Reset

func (m *ErrorInfo) Reset()

func (*ErrorInfo) Size added in v0.1.5

func (m *ErrorInfo) Size() (n int)

func (*ErrorInfo) String

func (m *ErrorInfo) String() string

func (*ErrorInfo) Unmarshal added in v0.1.5

func (m *ErrorInfo) Unmarshal(dAtA []byte) error

func (*ErrorInfo) XXX_DiscardUnknown added in v0.1.5

func (m *ErrorInfo) XXX_DiscardUnknown()

func (*ErrorInfo) XXX_Marshal added in v0.1.5

func (m *ErrorInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ErrorInfo) XXX_Merge added in v0.1.5

func (m *ErrorInfo) XXX_Merge(src proto.Message)

func (*ErrorInfo) XXX_MessageName added in v0.1.5

func (*ErrorInfo) XXX_MessageName() string

func (*ErrorInfo) XXX_Size added in v0.1.5

func (m *ErrorInfo) XXX_Size() int

func (*ErrorInfo) XXX_Unmarshal added in v0.1.5

func (m *ErrorInfo) XXX_Unmarshal(b []byte) error

type ErrorMessage

type ErrorMessage struct {
	ErrCode ErrorType `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3,enum=basepb.ErrorType" json:"err_code,omitempty"`
	// every error unique flag on same ErrorType
	ErrMsg string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
	// server error detail, only for log, empty for client
	ErrInternalInfo string `protobuf:"bytes,3,opt,name=err_internal_info,json=errInternalInfo,proto3" json:"err_internal_info,omitempty"`
	// server error stack stace, only for log, empty for client
	StackStace []uint64 `protobuf:"varint,4,rep,packed,name=stack_stace,json=stackStace,proto3" json:"stack_stace,omitempty"`
	// extra for error. For example, if there is an insufficient item error, this field can be the specific item ID.
	ErrExtraInfo string `protobuf:"bytes,5,opt,name=err_extra_info,json=errExtraInfo,proto3" json:"err_extra_info,omitempty"`
}

func (*ErrorMessage) Descriptor

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

func (*ErrorMessage) GetErrCode

func (m *ErrorMessage) GetErrCode() ErrorType

func (*ErrorMessage) GetErrExtraInfo

func (m *ErrorMessage) GetErrExtraInfo() string

func (*ErrorMessage) GetErrInternalInfo

func (m *ErrorMessage) GetErrInternalInfo() string

func (*ErrorMessage) GetErrMsg

func (m *ErrorMessage) GetErrMsg() string

func (*ErrorMessage) GetStackStace

func (m *ErrorMessage) GetStackStace() []uint64

func (*ErrorMessage) GoString added in v0.1.5

func (m *ErrorMessage) GoString() string

func (*ErrorMessage) Marshal added in v0.1.5

func (m *ErrorMessage) Marshal() (dAtA []byte, err error)

func (*ErrorMessage) MarshalEasyJSON added in v0.1.6

func (*ErrorMessage) MarshalJSON added in v0.1.5

func (m *ErrorMessage) MarshalJSON() ([]byte, error)

func (*ErrorMessage) MarshalTo added in v0.1.5

func (m *ErrorMessage) MarshalTo(dAtA []byte) (int, error)

func (*ErrorMessage) MarshalToSizedBuffer added in v0.1.5

func (m *ErrorMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ErrorMessage) MarshalZerologObject added in v0.1.6

func (m *ErrorMessage) MarshalZerologObject(e *zerolog.Event)

func (*ErrorMessage) ProtoMessage

func (*ErrorMessage) ProtoMessage()

func (*ErrorMessage) Reset

func (m *ErrorMessage) Reset()

func (*ErrorMessage) Size added in v0.1.5

func (m *ErrorMessage) Size() (n int)

func (*ErrorMessage) String

func (m *ErrorMessage) String() string

func (*ErrorMessage) Unmarshal added in v0.1.5

func (m *ErrorMessage) Unmarshal(dAtA []byte) error

func (*ErrorMessage) XXX_DiscardUnknown added in v0.1.5

func (m *ErrorMessage) XXX_DiscardUnknown()

func (*ErrorMessage) XXX_Marshal added in v0.1.5

func (m *ErrorMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ErrorMessage) XXX_Merge added in v0.1.5

func (m *ErrorMessage) XXX_Merge(src proto.Message)

func (*ErrorMessage) XXX_MessageName added in v0.1.5

func (*ErrorMessage) XXX_MessageName() string

func (*ErrorMessage) XXX_Size added in v0.1.5

func (m *ErrorMessage) XXX_Size() int

func (*ErrorMessage) XXX_Unmarshal added in v0.1.5

func (m *ErrorMessage) XXX_Unmarshal(b []byte) error

type ErrorType

type ErrorType int32
const (
	ErrorType_ETNo     ErrorType = 0
	ErrorType_ETNormal ErrorType = 1
	// the client can handle the following error types uniformly
	// ETProtocol,ETPanic,ETDataBase can be unified as an internal server error
	// ETNoAuth not login, you can treat it as disconnected and then jump to the login interface
	ErrorType_ETProtocol ErrorType = 2
	ErrorType_ETPanic    ErrorType = 3
	ErrorType_ETDataBase ErrorType = 4
	ErrorType_ETNoAuth   ErrorType = 5
)

func (ErrorType) EnumDescriptor

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

func (ErrorType) String

func (x ErrorType) String() string

type IntTrace

type IntTrace struct {
	RoleId         int64  `protobuf:"varint,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
	FromServerId   int64  `protobuf:"varint,2,opt,name=from_server_id,json=fromServerId,proto3" json:"from_server_id,omitempty"`
	FromServerType string `protobuf:"bytes,3,opt,name=from_server_type,json=fromServerType,proto3" json:"from_server_type,omitempty"`
	TraceId        string `protobuf:"bytes,4,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
}

func (*IntTrace) Descriptor

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

func (*IntTrace) GetFromServerId

func (m *IntTrace) GetFromServerId() int64

func (*IntTrace) GetFromServerType

func (m *IntTrace) GetFromServerType() string

func (*IntTrace) GetRoleId

func (m *IntTrace) GetRoleId() int64

func (*IntTrace) GetTraceId

func (m *IntTrace) GetTraceId() string

func (*IntTrace) GoString added in v0.1.5

func (m *IntTrace) GoString() string

func (*IntTrace) Marshal added in v0.1.5

func (m *IntTrace) Marshal() (dAtA []byte, err error)

func (*IntTrace) MarshalEasyJSON added in v0.1.6

func (m *IntTrace) MarshalEasyJSON(w *github_com_mailru_easyjson_jwriter.Writer)

func (*IntTrace) MarshalJSON added in v0.1.5

func (m *IntTrace) MarshalJSON() ([]byte, error)

func (*IntTrace) MarshalTo added in v0.1.5

func (m *IntTrace) MarshalTo(dAtA []byte) (int, error)

func (*IntTrace) MarshalToSizedBuffer added in v0.1.5

func (m *IntTrace) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*IntTrace) MarshalZerologObject added in v0.1.6

func (m *IntTrace) MarshalZerologObject(e *zerolog.Event)

func (*IntTrace) ProtoMessage

func (*IntTrace) ProtoMessage()

func (*IntTrace) Reset

func (m *IntTrace) Reset()

func (*IntTrace) Size added in v0.1.5

func (m *IntTrace) Size() (n int)

func (*IntTrace) String

func (m *IntTrace) String() string

func (*IntTrace) Unmarshal added in v0.1.5

func (m *IntTrace) Unmarshal(dAtA []byte) error

func (*IntTrace) XXX_DiscardUnknown added in v0.1.5

func (m *IntTrace) XXX_DiscardUnknown()

func (*IntTrace) XXX_Marshal added in v0.1.5

func (m *IntTrace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IntTrace) XXX_Merge added in v0.1.5

func (m *IntTrace) XXX_Merge(src proto.Message)

func (*IntTrace) XXX_MessageName added in v0.1.5

func (*IntTrace) XXX_MessageName() string

func (*IntTrace) XXX_Size added in v0.1.5

func (m *IntTrace) XXX_Size() int

func (*IntTrace) XXX_Unmarshal added in v0.1.5

func (m *IntTrace) XXX_Unmarshal(b []byte) error

type StringTrace

type StringTrace struct {
	RoleId         string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
	FromServerId   int64  `protobuf:"varint,2,opt,name=from_server_id,json=fromServerId,proto3" json:"from_server_id,omitempty"`
	FromServerType string `protobuf:"bytes,3,opt,name=from_server_type,json=fromServerType,proto3" json:"from_server_type,omitempty"`
	TraceId        string `protobuf:"bytes,4,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
}

func (*StringTrace) Descriptor

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

func (*StringTrace) GetFromServerId

func (m *StringTrace) GetFromServerId() int64

func (*StringTrace) GetFromServerType

func (m *StringTrace) GetFromServerType() string

func (*StringTrace) GetRoleId

func (m *StringTrace) GetRoleId() string

func (*StringTrace) GetTraceId

func (m *StringTrace) GetTraceId() string

func (*StringTrace) GoString added in v0.1.5

func (m *StringTrace) GoString() string

func (*StringTrace) Marshal added in v0.1.5

func (m *StringTrace) Marshal() (dAtA []byte, err error)

func (*StringTrace) MarshalEasyJSON added in v0.1.6

func (m *StringTrace) MarshalEasyJSON(w *github_com_mailru_easyjson_jwriter.Writer)

func (*StringTrace) MarshalJSON added in v0.1.5

func (m *StringTrace) MarshalJSON() ([]byte, error)

func (*StringTrace) MarshalTo added in v0.1.5

func (m *StringTrace) MarshalTo(dAtA []byte) (int, error)

func (*StringTrace) MarshalToSizedBuffer added in v0.1.5

func (m *StringTrace) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StringTrace) MarshalZerologObject added in v0.1.6

func (m *StringTrace) MarshalZerologObject(e *zerolog.Event)

func (*StringTrace) ProtoMessage

func (*StringTrace) ProtoMessage()

func (*StringTrace) Reset

func (m *StringTrace) Reset()

func (*StringTrace) Size added in v0.1.5

func (m *StringTrace) Size() (n int)

func (*StringTrace) String

func (m *StringTrace) String() string

func (*StringTrace) Unmarshal added in v0.1.5

func (m *StringTrace) Unmarshal(dAtA []byte) error

func (*StringTrace) XXX_DiscardUnknown added in v0.1.5

func (m *StringTrace) XXX_DiscardUnknown()

func (*StringTrace) XXX_Marshal added in v0.1.5

func (m *StringTrace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StringTrace) XXX_Merge added in v0.1.5

func (m *StringTrace) XXX_Merge(src proto.Message)

func (*StringTrace) XXX_MessageName added in v0.1.5

func (*StringTrace) XXX_MessageName() string

func (*StringTrace) XXX_Size added in v0.1.5

func (m *StringTrace) XXX_Size() int

func (*StringTrace) XXX_Unmarshal added in v0.1.5

func (m *StringTrace) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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