webserver

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 13 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 {
	// Registers all routes and handlers of the controller to the passed fiber.Router.
	Register(db database.Database, store *session.Store, router fiber.Router)
}

A controller holds all routes and handlers for a specific part of the API (for instance /api/auth/*).

type Middleware

type Middleware interface {
	// Registers a middleware to the passed router and injects all needed dependencies.
	Register(db database.Database, store *session.Store, router fiber.Router)
}

A middleware is a function executed before the request goes to the handler it can do things like checking authorization or append infos to the request.

type WebServer

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

WebServer object holding the webserver and all its dependencies.

func NewWebServer

func NewWebServer(db database.Database, config *config.Config) (*WebServer, error)

Instantiates and returns a WebServer object.

func (*WebServer) RunWebServer

func (ws *WebServer) RunWebServer() error

Runs the webserver

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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