grpc_gateway

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT, Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JsonPb = &JSONPb{}

Functions

func CustomHttpError

func CustomHttpError(ctx context.Context, mux *runtime.ServeMux, marshaler runtime.Marshaler, w http.ResponseWriter, r *http.Request, err error)

func New

func New() *runtime.ServeMux

func RoutingErrorHandler

func RoutingErrorHandler(ctx context.Context, mux *runtime.ServeMux, marshaler runtime.Marshaler, w http.ResponseWriter, r *http.Request, httpStatus int)

Types

type GatewayHandler

type GatewayHandler func(context.Context, *runtime.ServeMux)

type JSONPb

type JSONPb struct {
}

func (*JSONPb) ContentType

func (*JSONPb) ContentType(_ interface{}) string

func (*JSONPb) ContentTypeFromMessage

func (j *JSONPb) ContentTypeFromMessage(v interface{}) string

func (*JSONPb) Delimiter

func (j *JSONPb) Delimiter() []byte

func (*JSONPb) Marshal

func (j *JSONPb) Marshal(v any) ([]byte, error)

func (*JSONPb) Name

func (j *JSONPb) Name() string

func (*JSONPb) NewDecoder

func (j *JSONPb) NewDecoder(r io.Reader) runtime.Decoder

NewDecoder returns a runtime.Decoder which reads JSON stream from "r".

func (*JSONPb) NewEncoder

func (j *JSONPb) NewEncoder(w io.Writer) runtime.Encoder

NewEncoder returns an Encoder which writes JSON stream into "w".

func (*JSONPb) Unmarshal

func (j *JSONPb) Unmarshal(data []byte, v interface{}) error

Jump to

Keyboard shortcuts

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