service

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

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

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SecretService

type SecretService interface {
	CreateSecret(secret string) (string, error)
	RetrieveSecret(id string) (string, error)
}

func NewSecretService

func NewSecretService(repo repository.SecretRepository) SecretService

type UserService

type UserService interface {
	CreateUser(user *model.User) error
	GetUserByID(id uuid.UUID) (*model.User, error)
	UpdateUser(user *model.User) error
	DeleteUser(id uuid.UUID) error
	ListUsers() ([]*model.User, error)
}

func NewUserService

func NewUserService(repo repository.UserRepository) UserService

type WeatherAPIResponse

type WeatherAPIResponse struct {
	Location WeatherAPIResponseLocation `json:"location"`
	Current  WeatherAPIResponseCurrent  `json:"current"`
}

type WeatherAPIResponseCurrent

type WeatherAPIResponseCurrent struct {
	TempF     float64                            `json:"temp_f"`
	TempC     float64                            `json:"temp_c"`
	Condition WeatherAPIResponseCurrentCondition `json:"condition"`
}

type WeatherAPIResponseCurrentCondition

type WeatherAPIResponseCurrentCondition struct {
	Text string `json:"text"`
}

type WeatherAPIResponseLocation

type WeatherAPIResponseLocation struct {
	Name string `json:"name"`
}

type WeatherService

type WeatherService interface {
	GetWeather(location string) (*model.Weather, error)
}

func NewWeatherService

func NewWeatherService(cfg *config.Config) WeatherService

NewWeatherService creates a new weather service.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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