response

package
v0.0.0-...-1225d9a Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_mcube_pb_response_response_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Response

type Response struct {

	// 自定义返回码  0:表示正常
	Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	// 数据类型, 可以缺省
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// 异常的范围
	Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// 异常原因
	Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"`
	// 关于这次响应的说明信息
	Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
	// 数据meta
	Meta map[string]string `` /* 149-byte string literal not displayed */
	// data 具体的数据
	Data *anypb.Any `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Response to be used by controllers.

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetCode

func (x *Response) GetCode() int32

func (*Response) GetData

func (x *Response) GetData() *anypb.Any

func (*Response) GetMessage

func (x *Response) GetMessage() string

func (*Response) GetMeta

func (x *Response) GetMeta() map[string]string

func (*Response) GetNamespace

func (x *Response) GetNamespace() string

func (*Response) GetReason

func (x *Response) GetReason() string

func (*Response) GetType

func (x *Response) GetType() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

Jump to

Keyboard shortcuts

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