webserver

package
v0.0.0-...-d931726 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {

	// Setup sets up the controller using the passed
	// di.Container for dependency injection and
	// registers all endpoints to the passed fiber
	// router.
	Setup(container di.Container, router fiber.Router)
}

Controller is used to register endpoints for a specific section of an API

type Router

type Router interface {

	// SetContainer sets a di.Container to be
	// used for dependency injection
	SetContainer(container di.Container)

	// Route registers the API controller
	// endpoints to the passed fiber router.
	Route(router fiber.Router)
}

Router is used to register controllers for an API endpoint.

type WebServer

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

WebServer provides a REST API and static web server service.

func New

func New(container di.Container) (ws *WebServer, err error)

New returns a new instance of WebServer.

func (*WebServer) ListenAndServeBlocking

func (ws *WebServer) ListenAndServeBlocking() error

ListenAndServeBlocking starts the HTTP listening loop blocking the current go routine.

Directories

Path Synopsis
v1

Jump to

Keyboard shortcuts

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