api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiServer

type ApiServer struct {
	http.Server
	Port   string
	Models []models.ApiModel
}

func NewServer

func NewServer(port string, models []models.ApiModel, prometheusEnavbled bool, reg *prometheus.Registry) *ApiServer

func (*ApiServer) InitApi

func (a *ApiServer) InitApi()

func (*ApiServer) SetRouter

func (a *ApiServer) SetRouter(prometheusEnavbled bool, reg *prometheus.Registry) *mux.Router

func (*ApiServer) ShutDown

func (a *ApiServer) ShutDown()

type ApiServerInterface

type ApiServerInterface interface {
	SetRouter(prometheusEnavbled bool, reg *prometheus.Registry) *mux.Router
	InitApi()
	ShutDown()
}

type FakeApiServer

type FakeApiServer struct {
	Models   []models.ApiModel
	Port     string
	Shutdown bool
}

func (*FakeApiServer) InitApi

func (a *FakeApiServer) InitApi()

func (*FakeApiServer) SetRouter

func (a *FakeApiServer) SetRouter(prometheusEnavbled bool, reg *prometheus.Registry) *mux.Router

func (*FakeApiServer) ShutDown

func (a *FakeApiServer) ShutDown()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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