Documentation ¶
Index ¶
- type AuthFunc
- type Invoker
- type Method
- type Router
- func (rr *Router) RegisterService(ctx context.Context, ss protoreflect.ServiceDescriptor, conn Invoker) error
- func (rr *Router) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (rr *Router) SetNotFoundHandler(handler http.Handler)
- func (rr *Router) StaticJSON(path string, document interface{}) error
- func (rr *Router) Use(middleware func(http.Handler) http.Handler)
- func (rr *Router) UseCORS(config cors.Options)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthFunc ¶
AuthFunc translates a request into headers to pass on to the remote server Errors which implement gRPC status will be returned to the client as HTTP errors, otherwise 500 with a log line
type Method ¶
type Method struct { FullName string Input protoreflect.MessageDescriptor Output protoreflect.MessageDescriptor Invoker Invoker HTTPMethod string HTTPPath string ForwardResponseHeaders map[string]bool ForwardRequestHeaders map[string]bool CodecOptions jsonapi.Options // contains filtered or unexported fields }
type Router ¶
type Router struct { ForwardResponseHeaders map[string]bool ForwardRequestHeaders map[string]bool CodecOptions jsonapi.Options AuthFunc AuthFunc // contains filtered or unexported fields }
func (*Router) RegisterService ¶
func (rr *Router) RegisterService(ctx context.Context, ss protoreflect.ServiceDescriptor, conn Invoker) error
func (*Router) SetNotFoundHandler ¶
func (*Router) StaticJSON ¶
Click to show internal directories.
Click to hide internal directories.