types

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerFunc

type HandlerFunc func(context.Context, interface{}) (interface{}, error)

type HttpDecoder added in v1.1.0

type HttpDecoder func(ctx context.Context, r *http.Request) (request interface{}, err error)

type HttpEncoder added in v1.1.0

type HttpEncoder func(ctx context.Context, response interface{}) (headers map[string][]string, body []byte, err error)

type HttpRequestMiddleware added in v1.1.0

type HttpRequestMiddleware func(ctx context.Context, incomingRequest interface{}) (outgoingContext context.Context, outgoingRequest interface{}, err error)

type HttpResponse

type HttpResponse struct {
	StatusCode int
	Headers    map[string]string
	Body       []byte
}

type HttpResponseMiddleware added in v1.1.0

type HttpResponseMiddleware func(ctx context.Context, incomingResponse interface{}) (outgoingResponse interface{}, err error)

type MethodOptions added in v1.1.0

type MethodOptions struct {
	IsStreamingResponse bool
}

type ServeOptions

type ServeOptions struct {
	Handler            HandlerFunc
	Decoder            HttpDecoder
	Encoder            HttpEncoder
	RequestMiddleware  HttpRequestMiddleware
	ResponseMiddleware HttpResponseMiddleware
	Options            MethodOptions
}

type StreamChunk

type StreamChunk struct {
	Id   uint32
	Data []byte
}

Jump to

Keyboard shortcuts

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