runtime

package
v0.0.31 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 17 Imported by: 0

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 Gateway

func Gateway(gatewayHandle GatewayHandler) *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 added in v0.0.8

type JSONPb struct {
}

func (*JSONPb) ContentType added in v0.0.8

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

func (*JSONPb) ContentTypeFromMessage added in v0.0.8

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

func (*JSONPb) Delimiter added in v0.0.8

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

func (*JSONPb) Marshal added in v0.0.8

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

func (*JSONPb) Name added in v0.0.8

func (j *JSONPb) Name() string

func (*JSONPb) NewDecoder added in v0.0.8

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

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

func (*JSONPb) NewEncoder added in v0.0.8

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

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

func (*JSONPb) Unmarshal added in v0.0.8

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