httpsrv

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Feature

func Feature(config ...func(installer *Installer)) miruken.Feature

Feature configures http server support

Types

type ApiController added in v0.22.0

type ApiController struct {
	// contains filtered or unexported fields
}

ApiController is an http.Handler for api messages.

func Api added in v0.22.0

func Api(ctx *context.Context) *ApiController

Api creates a new ApiController to serve http routed messages.

func (*ApiController) ServeHTTP added in v0.22.0

func (c *ApiController) ServeHTTP(
	w http.ResponseWriter,
	r *http.Request,
)

type Installer

type Installer struct{}

Installer configures http server support

func (*Installer) DependsOn

func (i *Installer) DependsOn() []miruken.Feature

func (*Installer) Install

func (i *Installer) Install(setup *miruken.SetupBuilder) error

type StatusCodeMapper

type StatusCodeMapper struct{}

func (*StatusCodeMapper) JsonSyntax added in v0.21.0

func (s *StatusCodeMapper) JsonSyntax(
	_ *struct {
		maps.It
		maps.Format `to:"http:status-code"`
	}, _ *json.SyntaxError,
) int

func (*StatusCodeMapper) NotHandled added in v0.21.0

func (s *StatusCodeMapper) NotHandled(
	_ *struct {
		maps.It
		maps.Format `to:"http:status-code"`
	}, nhe *miruken.NotHandledError,
) int

func (*StatusCodeMapper) UnknownTypeId added in v0.21.0

func (s *StatusCodeMapper) UnknownTypeId(
	_ *struct {
		maps.It
		maps.Format `to:"http:status-code"`
	}, _ *api.UnknownTypeIdError,
) int

func (*StatusCodeMapper) Validation added in v0.21.0

func (s *StatusCodeMapper) Validation(
	_ *struct {
		maps.It
		maps.Format `to:"http:status-code"`
	}, _ *validates.Outcome,
) int

Directories

Path Synopsis
ui

Jump to

Keyboard shortcuts

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