server

package
v0.0.0-...-2f2c24c Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTP

type HTTP interface {
	AddRoute(route Route)
	Run()
	Stop()

	util.LifetimeDependency
}

func NewHTTP

func NewHTTP(opts ...Options) HTTP

type Handler

type Handler func(request *dto.Request) *dto.Response

type Options

type Options interface {
	// contains filtered or unexported methods
}

func WithAddr

func WithAddr(addr string) Options

type Route

type Route interface {
	Method() string
	Path() string
	Handler(request *dto.Request) *dto.Response
	Group() string
}

Jump to

Keyboard shortcuts

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