http

package
v0.0.0-...-da789b0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(b *base.Node, node *http.HTTP) graph.Node

func NewProto

func NewProto(name string, c *http.HTTP) *gen.Node

func NewResponseProto

func NewResponseProto() *http.HTTP

func NewRouteProto

func NewRouteProto() *http.HTTP

func NewTemplateProto

func NewTemplateProto(t string) *http.HTTP

Types

type HTTPEventStream

type HTTPEventStream struct {
	Requests    chan rxgo.Item
	Responses   chan rxgo.Item
	RequestObs  rxgo.Observable
	ResponseObs rxgo.Observable
}

func NewHTTPEventStream

func NewHTTPEventStream() *HTTPEventStream

TODO breadchris proper dependency injection will need to be figured out to make this work

type Response

type Response struct {
	*base.Node
	*http.Response
}

func NewResponse

func NewResponse(b *base.Node, node *http.Response) *Response

func (*Response) Wire

func (n *Response) Wire(ctx context.Context, input graph.IO) (graph.IO, error)

type RouteNode

type RouteNode struct {
	*base.Node
	*http.Route
}

func NewRouteNode

func NewRouteNode(b *base.Node, node *http.Route) *RouteNode

func (*RouteNode) Path

func (n *RouteNode) Path(r *Router) string

func (*RouteNode) Wire

func (n *RouteNode) Wire(ctx context.Context, input graph.IO) (graph.IO, error)

type Router

type Router struct {
	*base.Node
	*http.Router
	HTTPStream *HTTPEventStream
}

func NewRouterNode

func NewRouterNode(b *base.Node, node *http.Router) *Router

func (*Router) Provide

func (r *Router) Provide() ([]*gen.Node, error)

func (*Router) Wire

func (r *Router) Wire(ctx context.Context, input graph.IO) (graph.IO, error)

type TemplateFSNode

type TemplateFSNode struct {
	*base.Node
	*http.TemplateFS
}

func NewTemplateFSNode

func NewTemplateFSNode(b *base.Node, node *http.TemplateFS) *TemplateFSNode

func (*TemplateFSNode) Provide

func (n *TemplateFSNode) Provide() ([]*gen.Node, error)

func (*TemplateFSNode) Wire

func (n *TemplateFSNode) Wire(ctx context.Context, input graph.IO) (graph.IO, error)

type TemplateNode

type TemplateNode struct {
	*base.Node
	// contains filtered or unexported fields
}

func NewTemplateNode

func NewTemplateNode(b *base.Node, node *http.Template) *TemplateNode

func (*TemplateNode) Wire

func (n *TemplateNode) Wire(ctx context.Context, input graph.IO) (graph.IO, error)

Jump to

Keyboard shortcuts

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