Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodedResponseWriter ¶
type CodedResponseWriter struct { http.ResponseWriter // contains filtered or unexported fields }
CodedResponseWriter saves a response code to be read later.
func NewCodedWriter ¶
func NewCodedWriter(w http.ResponseWriter) *CodedResponseWriter
NewCodedWriter wraps an existing http.ResponseWriter.
func (*CodedResponseWriter) Hijack ¶ added in v2.2.8
func (w *CodedResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)
Hijacker implements http.Hijacker.
Works only if given http.ResponseWriter implements .Hijack().
func (*CodedResponseWriter) ResponseCode ¶
func (w *CodedResponseWriter) ResponseCode() int
ResponseCode returns a code that was written to the transport.
func (*CodedResponseWriter) WriteHeader ¶
func (w *CodedResponseWriter) WriteHeader(statusCode int)
func (*CodedResponseWriter) Written ¶
func (w *CodedResponseWriter) Written() bool
Written returns true if headers were written (or the whole response).
type DescOptions ¶ added in v2.2.0
type DescOptions struct { UnaryInterceptor grpc.UnaryServerInterceptor SwaggerDefaultOpts []swagger.Option }
DescOptions provides options for a ServiceDesc compiled code.
type MarshalerError ¶ added in v2.2.0
type MarshalerError struct {
Err error
}
MarshalerError is returned by a marshaler func. It is used to decorate errors coming from gRPC-generated _Handler to distinguish parser errors from handlers' errors.
func NewMarshalerError ¶ added in v2.2.0
func NewMarshalerError(err error) MarshalerError
func (MarshalerError) Cause ¶ added in v2.2.0
func (m MarshalerError) Cause() error
func (MarshalerError) Error ¶ added in v2.2.0
func (m MarshalerError) Error() string
type OptionSwaggerOpts ¶ added in v2.2.0
OptionSwaggerOpts sets up default options for the SwaggerDef().
func (OptionSwaggerOpts) Apply ¶ added in v2.2.0
func (o OptionSwaggerOpts) Apply(oo *DescOptions)
Apply implements transport.DescOption.
type OptionUnaryInterceptor ¶ added in v2.2.0
type OptionUnaryInterceptor struct {
Interceptor grpc.UnaryServerInterceptor
}
OptionUnaryInterceptor sets up the gRPC unary interceptor.
func (OptionUnaryInterceptor) Apply ¶ added in v2.2.0
func (o OptionUnaryInterceptor) Apply(oo *DescOptions)
Apply implements transport.DescOption.
type TransportStream ¶
type TransportStream struct {
// contains filtered or unexported fields
}
TransportStream implements grpc.ServerTransportStream for the HTTP calls.
func NewTStream ¶
func NewTStream(w http.ResponseWriter) *TransportStream
NewTStream creates and returns new TransportStream writing to supplied http.ResponseWriter.
func (*TransportStream) Method ¶
func (ts *TransportStream) Method() string
Method implements grpc.ServerTransportStream.
func (*TransportStream) SendHeader ¶
func (ts *TransportStream) SendHeader(md metadata.MD) error
SendHeader implements grpc.ServerTransportStream.
func (*TransportStream) SetHeader ¶
func (ts *TransportStream) SetHeader(md metadata.MD) error
SetHeader implements grpc.ServerTransportStream.
func (*TransportStream) SetTrailer ¶
func (ts *TransportStream) SetTrailer(md metadata.MD) error
SetTrailer implements grpc.ServerTransportStream.