server

package
v0.0.0-...-e6f38c9 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(ctx context.Context, srv *fiber.App, conf *config.Config)

ListenAndServe starts http server and handles graceful shutdown

func Router

func Router(health rest.HealthWebHandler, purchase handlers.PurchaseHandler) *fiber.App

func Run

func Run(ctx context.Context, c HttpConfig)

Types

type HttpConfig

type HttpConfig struct {
	Cfg *config.Config
	Db  *database.Database
}

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc fiber.Handler
	Public      bool
	Scopes      []string
}

type Routes

type Routes []Route

Jump to

Keyboard shortcuts

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