response

package
v0.6.10 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: MIT Imports: 15 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_hopeio_response_response_proto protoreflect.FileDescriptor
View Source
var RespOk = &CommonResp{}

Functions

This section is empty.

Types

type AnyResp added in v0.5.3

type AnyResp struct {
	Code int32      `protobuf:"varint,1,opt,name=code,proto3" json:"code"`
	Msg  string     `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Data *anypb.Any `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*AnyResp) Descriptor deprecated added in v0.5.3

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

Deprecated: Use AnyResp.ProtoReflect.Descriptor instead.

func (*AnyResp) GetCode added in v0.5.3

func (x *AnyResp) GetCode() int32

func (*AnyResp) GetData added in v0.5.3

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

func (*AnyResp) GetMsg added in v0.5.3

func (x *AnyResp) GetMsg() string

func (*AnyResp) ProtoMessage added in v0.5.3

func (*AnyResp) ProtoMessage()

func (*AnyResp) ProtoReflect added in v0.5.3

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

func (*AnyResp) Reset added in v0.5.3

func (x *AnyResp) Reset()

func (*AnyResp) String added in v0.5.3

func (x *AnyResp) String() string

type CommonResp added in v0.5.3

type CommonResp struct {
	Code int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code"`
	Msg  string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

返回数据为字符串,用于新建修改删除类的成功失败提示

func (*CommonResp) Descriptor deprecated added in v0.5.3

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

Deprecated: Use CommonResp.ProtoReflect.Descriptor instead.

func (*CommonResp) GetCode added in v0.5.3

func (x *CommonResp) GetCode() int32

func (*CommonResp) GetMsg added in v0.5.3

func (x *CommonResp) GetMsg() string

func (*CommonResp) ProtoMessage added in v0.5.3

func (*CommonResp) ProtoMessage()

func (*CommonResp) ProtoReflect added in v0.5.3

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

func (*CommonResp) Reset added in v0.5.3

func (x *CommonResp) Reset()

func (*CommonResp) String added in v0.5.3

func (x *CommonResp) String() string

type HttpResponse

type HttpResponse struct {
	Headers map[string]string `` /* 141-byte string literal not displayed */
	Body    []byte            `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
	Status  int32             `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*HttpResponse) CommonRespond added in v0.5.3

func (x *HttpResponse) CommonRespond(ctx context.Context, w httpx.CommonResponseWriter) (int, error)

func (*HttpResponse) Descriptor deprecated

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

Deprecated: Use HttpResponse.ProtoReflect.Descriptor instead.

func (*HttpResponse) GetBody

func (x *HttpResponse) GetBody() []byte

func (*HttpResponse) GetContentType

func (x *HttpResponse) GetContentType() string

func (*HttpResponse) GetHeaders added in v0.1.7

func (x *HttpResponse) GetHeaders() map[string]string

func (*HttpResponse) GetStatus added in v0.1.7

func (x *HttpResponse) GetStatus() int32

func (*HttpResponse) MarshalGQL

func (x *HttpResponse) MarshalGQL(w io.Writer)

func (*HttpResponse) MarshalProto

func (x *HttpResponse) MarshalProto(w io.Writer)

func (*HttpResponse) ProtoMessage

func (*HttpResponse) ProtoMessage()

func (*HttpResponse) ProtoReflect

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

func (*HttpResponse) Reset

func (x *HttpResponse) Reset()

func (*HttpResponse) Respond added in v0.5.3

func (x *HttpResponse) Respond(ctx context.Context, w http.ResponseWriter) (int, error)

func (*HttpResponse) ServerHTTP added in v0.5.5

func (x *HttpResponse) ServerHTTP(w http.ResponseWriter, r *http.Request) (int, error)

func (*HttpResponse) String

func (x *HttpResponse) String() string

func (*HttpResponse) UnmarshalGQL

func (x *HttpResponse) UnmarshalGQL(v interface{}) error

type RawResp added in v0.5.3

type RawResp struct {
	Code int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code"`
	Msg  string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// 字节数组json
	Data *any1.RawData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*RawResp) Descriptor deprecated added in v0.5.3

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

Deprecated: Use RawResp.ProtoReflect.Descriptor instead.

func (*RawResp) GetCode added in v0.5.3

func (x *RawResp) GetCode() int32

func (*RawResp) GetData added in v0.5.3

func (x *RawResp) GetData() *any1.RawData

func (*RawResp) GetMsg added in v0.5.3

func (x *RawResp) GetMsg() string

func (*RawResp) ProtoMessage added in v0.5.3

func (*RawResp) ProtoMessage()

func (*RawResp) ProtoReflect added in v0.5.3

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

func (*RawResp) Reset added in v0.5.3

func (x *RawResp) Reset()

func (*RawResp) String added in v0.5.3

func (x *RawResp) String() string

type RespData added in v0.5.3

type RespData struct {
	Code uint32        `json:"code"`
	Msg  string        `json:"msg"`
	Data proto.Message `json:"data"`
}

type StringValue

type StringValue = wrapperspb.StringValue

type StringValueInput

type StringValueInput = wrapperspb.StringValue

graphql compatible

Jump to

Keyboard shortcuts

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