http

package
v0.0.130 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: BSD-3-Clause Imports: 15 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]) runtime.Consumer[T]

Types

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)

type NetHTTPEndpointConsumer

type NetHTTPEndpointConsumer interface {
	runtime.InputEndpointConsumer
	EndpointRequest(requestData NetHTTPEndpointRequestData) error
}

type NetHTTPEndpointGorillaSchemaConsumer

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

func (*NetHTTPEndpointGorillaSchemaConsumer[T]) EndpointRequest

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

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

type NetHTTPEndpointRequestData

type NetHTTPEndpointRequestData interface {
	ResponseWriter() http.ResponseWriter
	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)
}

Jump to

Keyboard shortcuts

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