Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_main_proto protoreflect.FileDescriptor
Functions ¶
func WriteHTTPErrorResponse ¶
func WriteHTTPErrorResponse(w http.ResponseWriter, r *http.Request, err error)
WriteHTTPErrorResponse set HTTP status code and write error description to the body.
Types ¶
type BodyReWriterFunc ¶
BodyReWriterFunc
func DefaultBodyWriter ¶
func DefaultBodyWriter(bodyMarshaler, errorMarshaler runtime.Marshaler, withoutHTTPStatus bool) BodyReWriterFunc
DefaultBodyWriter
type MuxError ¶
type MuxError struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
Error is the generic error returned from unary RPCs.
func (*MuxError) Descriptor
deprecated
func (*MuxError) GetMessage ¶
func (*MuxError) ProtoMessage ¶
func (*MuxError) ProtoMessage()
func (*MuxError) ProtoReflect ¶
func (x *MuxError) ProtoReflect() protoreflect.Message
type ResponseWriter ¶
type ResponseWriter struct { Status *status.Status Writer http.ResponseWriter HeaderStatus int BodyWriter BodyReWriterFunc WithoutHTTPStatus bool }
ResponseWriter
func (*ResponseWriter) Header ¶
func (l *ResponseWriter) Header() http.Header
Header implement responseWriter
func (*ResponseWriter) Write ¶
func (l *ResponseWriter) Write(b []byte) (i int, err error)
Write implement responseWrite
func (*ResponseWriter) WriteHeader ¶
func (l *ResponseWriter) WriteHeader(s int)
WriteHeader WriteHeader
Click to show internal directories.
Click to hide internal directories.