controler

package
v0.0.0-...-7fd60d6 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHealthControler

func NewHealthControler() *healthControler

NewHealthControler creates a controler for healthcheck

func NewWeatherControler

func NewWeatherControler(l *zap.Logger, service weather.WeatherService) *weatherControler

NewWeatherControler creates a controler for weathercheck

func Start

func Start(cfg *configs.Config, e *echo.Echo, l *zap.Logger, service weather.WeatherService, startChan chan<- struct{}) error

Start starts the weather service

func Stop

func Stop(ctx context.Context, e *echo.Echo) error

Stop stops the weather service

Types

type CustomValidator

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

CustomValidator hooks any validator framework that implements Validate interface

func NewCustomValidator

func NewCustomValidator(v *validator.Validate) *CustomValidator

NewCustomValidator creates a new validator for the api controler

func (*CustomValidator) Validate

func (cv *CustomValidator) Validate(i interface{}) error

Validate validates the given parameters

type HealthControler

type HealthControler interface {
	GetHealthCheck(c echo.Context) error
}

HealthControler health check controler

type TemperatureReqParams

type TemperatureReqParams struct {
	City    string `json:"city" validate:"required"`
	Country string `json:"country"`
}

TemperatureReqParams parameters for the temperature weather api

type WeatherControler

type WeatherControler interface {
	GetTemperatureForCity(c echo.Context) error
}

WeatherControler weather check controler

Jump to

Keyboard shortcuts

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