server

package
v0.0.0-...-f7f2675 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package server provides a simple HTTP/HTTPS server implementation for serving static and connect API.

Package server provides a simple HTTP/HTTPS server implementation for serving static and connect API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is a struct that represents a Fiber server instance with an underlying `fiber.App`, `fiber.Router` for the API endpoints, and a map of `fiber.Router` instances for different API versions.

func Create

func Create() *Server

Create return a instance os Server Pattern Singleton

func (*Server) API

func (server *Server) API(api *api.API)

API is a method of the `Server` struct that registers the provided API with the server. It creates a new version of the API router, adds the provided API to the router's namespace, and registers the new router with the server's main `app` instance.

func (*Server) Start

func (server *Server) Start()

Start is a method of the `Server` struct that starts the server and listens for incoming HTTP and/or HTTPS requests, depending on the `config` settings.

Jump to

Keyboard shortcuts

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