httpserver

package
v0.0.0-...-25b3a80 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Injector

func Injector(server *ApiServer) func(*fiber.Ctx) error

Injector middleware now accepts ApiServer and sets dependencies in the injector

Types

type ApiServer

type ApiServer struct {
	sync.Mutex
	Config           Config
	Log              *log.Entry
	App              *fiber.App
	Validator        omnitruck.RequestValidator
	Mode             constants.ApiType
	DatabaseService  dboperations.IDbOperations
	TemplateRenderer template.TemplateRenderer
	Replicated       replicated.IReplicated
	LicenseClient    clients.ILicense
	// contains filtered or unexported fields
}

func New

func New(c Config) *ApiServer

func (*ApiServer) HealthCheck

func (server *ApiServer) HealthCheck(c *fiber.Ctx) error

func (*ApiServer) Initialize

func (server *ApiServer) Initialize(c Config) *ApiServer

func (*ApiServer) Start

func (server *ApiServer) Start(wg *sync.WaitGroup) error

func (*ApiServer) StartService

func (server *ApiServer) StartService()

type Config

type Config struct {
	Name          string
	Listen        string
	Log           *log.Entry
	Mode          constants.ApiType
	ServiceConfig config.ServiceConfig
}

type Service

type Service interface {
	Name() string
	Start(*sync.WaitGroup) error
	Stop() error
}

Jump to

Keyboard shortcuts

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