Documentation
¶
Index ¶
- func NewHealthControler() *healthControler
- func NewWeatherControler(l *zap.Logger, service weather.WeatherService) *weatherControler
- func Start(cfg *configs.Config, e *echo.Echo, l *zap.Logger, ...) error
- func Stop(ctx context.Context, e *echo.Echo) error
- type CustomValidator
- type HealthControler
- type TemperatureReqParams
- type WeatherControler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHealthControler ¶
func NewHealthControler() *healthControler
NewHealthControler creates a controler for healthcheck
func NewWeatherControler ¶
NewWeatherControler creates a controler for weathercheck
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
Click to show internal directories.
Click to hide internal directories.