controllers

package
v0.0.0-...-d85391b Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BadRequest = errors.New("Data is corrupted or not valid.")
)
View Source
var (
	UnableConnectToDb = errors.New("nable to connect to DB")
)

Functions

func NewConvertController

func NewConvertController(svc services.CurrencyService) *convertController

func NewCurrencyController

func NewCurrencyController(svc services.CurrencyService) *currencyController

func NewStockController

func NewStockController(svc grpc.YahooFinanceService) *stockController

Types

type ServiceStatus

type ServiceStatus string
const (
	UP   ServiceStatus = "OK"
	DOWN ServiceStatus = "DOWN"
)

type StatusController

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

func NewStatusController

func NewStatusController(s *models.ServiceInfo, dbManager db.MongoManager) *StatusController

New instance init

func (*StatusController) CheckStatus

func (sc *StatusController) CheckStatus(ctx *gin.Context)

Checks the health of all the dependencies of the service to ensure complete serviceability

type StatusResponce

type StatusResponce struct {
	Status      ServiceStatus
	ServiceName string
	UpTime      time.Time
	Environment string
	Version     string
}

Jump to

Keyboard shortcuts

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