http

package
v0.0.195 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeNetHTTPEndpointConsumer

func MakeNetHTTPEndpointConsumer[T any](stream runtime.TypedInputStream[T], handler NetHTTPEndpointHandler[T]) runtime.Consumer[T]

Types

type HandlerData added in v0.0.186

type HandlerData struct {
	Writer  http.ResponseWriter
	Request *http.Request
}

type NetHTTPDataSource

type NetHTTPDataSource struct {
	*runtime.InputDataSource
	// contains filtered or unexported fields
}

func (*NetHTTPDataSource) AddHandler

func (ds *NetHTTPDataSource) AddHandler(pattern string, handler http.Handler)

func (*NetHTTPDataSource) Start

func (ds *NetHTTPDataSource) Start(ctx context.Context) error

func (*NetHTTPDataSource) Stop

func (ds *NetHTTPDataSource) Stop(ctx context.Context)

type NetHTTPEndpoint

type NetHTTPEndpoint struct {
	*runtime.DataSourceEndpoint
	// contains filtered or unexported fields
}

func (*NetHTTPEndpoint) ServeHTTP

func (ep *NetHTTPEndpoint) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*NetHTTPEndpoint) Start added in v0.0.186

func (ep *NetHTTPEndpoint) Start(ctx context.Context) error

func (*NetHTTPEndpoint) Stop added in v0.0.186

func (ep *NetHTTPEndpoint) Stop(ctx context.Context)

type NetHTTPEndpointConsumer

type NetHTTPEndpointConsumer interface {
	runtime.InputEndpointConsumer
	EndpointRequest(requestData NetHTTPEndpointRequestData) error
	Start(context.Context) error
	Stop(context.Context)
}

type NetHTTPEndpointCustomConsumer added in v0.0.186

type NetHTTPEndpointCustomConsumer[T any] struct {
	NetHTTPEndpointTypedConsumer[T]
	// contains filtered or unexported fields
}

func (*NetHTTPEndpointCustomConsumer[T]) EndpointRequest added in v0.0.186

func (ec *NetHTTPEndpointCustomConsumer[T]) EndpointRequest(requestData NetHTTPEndpointRequestData) error

func (*NetHTTPEndpointCustomConsumer[T]) Out added in v0.0.186

func (ec *NetHTTPEndpointCustomConsumer[T]) Out(value T)

func (*NetHTTPEndpointCustomConsumer[T]) Start added in v0.0.186

func (*NetHTTPEndpointCustomConsumer[T]) Stop added in v0.0.186

type NetHTTPEndpointFormConsumer added in v0.0.177

type NetHTTPEndpointFormConsumer[T any] struct {
	NetHTTPEndpointTypedConsumer[T]
	// contains filtered or unexported fields
}

func (*NetHTTPEndpointFormConsumer[T]) EndpointRequest added in v0.0.177

func (ec *NetHTTPEndpointFormConsumer[T]) EndpointRequest(requestData NetHTTPEndpointRequestData) error

func (*NetHTTPEndpointFormConsumer[T]) Start added in v0.0.186

func (*NetHTTPEndpointFormConsumer[T]) Stop added in v0.0.186

func (ec *NetHTTPEndpointFormConsumer[T]) Stop(ctx context.Context)

type NetHTTPEndpointHandler added in v0.0.186

type NetHTTPEndpointHandler[T any] interface {
	Handler(*HandlerData, runtime.Collect[T])
}

type NetHTTPEndpointJsonConsumer

type NetHTTPEndpointJsonConsumer[T any] struct {
	NetHTTPEndpointTypedConsumer[T]
	// contains filtered or unexported fields
}

func (*NetHTTPEndpointJsonConsumer[T]) DeserializeJson

func (ec *NetHTTPEndpointJsonConsumer[T]) DeserializeJson(data string) (T, error)

func (*NetHTTPEndpointJsonConsumer[T]) DeserializeJsonBody

func (ec *NetHTTPEndpointJsonConsumer[T]) DeserializeJsonBody(reader io.Reader) (T, error)

func (*NetHTTPEndpointJsonConsumer[T]) EndpointRequest

func (ec *NetHTTPEndpointJsonConsumer[T]) EndpointRequest(requestData NetHTTPEndpointRequestData) error

func (*NetHTTPEndpointJsonConsumer[T]) Start added in v0.0.186

func (*NetHTTPEndpointJsonConsumer[T]) Stop added in v0.0.186

func (ec *NetHTTPEndpointJsonConsumer[T]) Stop(ctx context.Context)

type NetHTTPEndpointRequestData

type NetHTTPEndpointRequestData interface {
	ResponseWriter() http.ResponseWriter
	Request() *http.Request
	GetBody() (io.ReadCloser, error)
	GetForm() (url.Values, error)
	GetQuery() url.Values
	GetMethod() string
}

type NetHTTPEndpointTypedConsumer

type NetHTTPEndpointTypedConsumer[T any] struct {
	*runtime.DataSourceEndpointConsumer[T]
	// contains filtered or unexported fields
}

type NetHTTPInputDataSource

type NetHTTPInputDataSource interface {
	runtime.DataSource
	AddHandler(pattern string, handler http.Handler)
}

type NetHTTPInputEndpoint added in v0.0.186

type NetHTTPInputEndpoint interface {
	runtime.InputEndpoint
	Start(context.Context) error
	Stop(context.Context)
}

Jump to

Keyboard shortcuts

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