23 lines
333 B
Go
23 lines
333 B
Go
package meteo
|
|
|
|
import (
|
|
"context"
|
|
"sync"
|
|
)
|
|
|
|
type inMemory struct {
|
|
data map[string]MeteoData
|
|
mu *sync.RWMutex
|
|
}
|
|
type Service struct {
|
|
inMemory
|
|
}
|
|
|
|
func NewService() *Service {
|
|
return &Service{}
|
|
}
|
|
|
|
func (s *Service) GetWeatherByCity(ctx context.Context, params GetMeteoData) ([]MeteoData, error) {
|
|
return []MeteoData{}, nil
|
|
}
|