Versions in this module Expand all Collapse all v0 v0.2.1 Jan 16, 2023 Changes in this version + const CodeErr + const CodeOK + var File_resp_proto protoreflect.FileDescriptor + func GzipPbRespOK(w http.ResponseWriter, m proto.Message) error + func PbRespError(w http.ResponseWriter, err error) error + func PbRespOK(w http.ResponseWriter, m proto.Message) error + type PbResp struct + Code int32 + Data *anypb.Any + Message string + func (*PbResp) Descriptor() ([]byte, []int) + func (*PbResp) ProtoMessage() + func (x *PbResp) GetCode() int32 + func (x *PbResp) GetData() *anypb.Any + func (x *PbResp) GetMessage() string + func (x *PbResp) ProtoReflect() protoreflect.Message + func (x *PbResp) Reset() + func (x *PbResp) String() string + type Resp struct + Code int + Data T + Msg string + func NewResp(code int, msg string, data T) *Resp[T] + func RespErr(err error) *Resp[any] + func RespMsg(code int, msg string) *Resp[any] + func RespOK(data T) *Resp[T]