common

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "SUCCEED",
		1: "FAILED",
	}
	ErrorReason_value = map[string]int32{
		"SUCCEED": 0,
		"FAILED":  1,
	}
)

Enum value maps for ErrorReason.

View Source
var File_api_common_error_reason_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_SUCCEED ErrorReason = 0
	ErrorReason_FAILED  ErrorReason = 1
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

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

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type Msg

type Msg struct {
	Reason  ErrorReason `protobuf:"varint,1,opt,name=Reason,proto3,enum=common.ErrorReason" json:"Reason,omitempty"`
	Message string      `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	// contains filtered or unexported fields
}

func Response

func Response(failMsg ...string) *Msg

func (*Msg) Descriptor deprecated

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

Deprecated: Use Msg.ProtoReflect.Descriptor instead.

func (*Msg) GetMessage

func (x *Msg) GetMessage() string

func (*Msg) GetReason

func (x *Msg) GetReason() ErrorReason

func (*Msg) ProtoMessage

func (*Msg) ProtoMessage()

func (*Msg) ProtoReflect

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

func (*Msg) Reset

func (x *Msg) Reset()

func (*Msg) String

func (x *Msg) String() string

Jump to

Keyboard shortcuts

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