services

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FactsService

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

FactsService provides operations for retrieving facts

func NewFactsService

func NewFactsService() *FactsService

NewFactsService creates a new facts service with predefined facts

func (*FactsService) GetFactAbout

func (s *FactsService) GetFactAbout(topic string) string

GetFactAbout retrieves a fact about a given topic

type WeatherService

type WeatherService struct {
	DB db.WeatherDB
}

WeatherService provides operations for weather data

func NewWeatherService

func NewWeatherService(db db.WeatherDB) *WeatherService

NewWeatherService creates a new weather service

func (*WeatherService) GetWeatherForLocation

func (s *WeatherService) GetWeatherForLocation(ctx context.Context, location string) (models.WeatherResource, error)

GetWeatherForLocation retrieves weather data for a location and transforms it to a resource representation

func (*WeatherService) ListLocations

func (s *WeatherService) ListLocations(ctx context.Context) ([]models.LocationResource, error)

ListLocations retrieves all available locations and transforms them to resource representations

Jump to

Keyboard shortcuts

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