Documentation ¶
Index ¶
Constants ¶
View Source
const (
ComponentName string = "http-server"
)
Variables ¶
View Source
var ErrUnknownComponent = fmt.Errorf("component is not the %s component", ComponentName)
View Source
var (
ErrUnknownMethod error = fmt.Errorf("unknown http method")
)
Functions ¶
func WithRequestLogger ¶
func WithRequestLogger() components.Option
func WithRoute ¶
func WithRoute(route Route) components.Option
func WithServerPort ¶
func WithServerPort(port int) components.Option
Types ¶
type Component ¶
type Component struct { components.Base // contains filtered or unexported fields }
func (*Component) RegisterRoute ¶
func (*Component) RegisterRoutes ¶
Click to show internal directories.
Click to hide internal directories.