gateways

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoObservation      = ObservationOption(0)
	OneHourObservation = ObservationOption(1)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ForecastMessage

type ForecastMessage struct {
	Forecast   domain.Forecast
	ImageURL   string
	WeatherURL string
}

type NotificationService

type NotificationService interface {
	SendForecastMessage(ctx context.Context, recipient domain.Recipient, message ForecastMessage) error
}

type ObservationOption

type ObservationOption int

type PNGRepository

type PNGRepository interface {
	FindById(ctx context.Context, id domain.ImageID) (*domain.Image, error)
	RemoveOlderThan(ctx context.Context, t time.Time) (int, error)
	Save(ctx context.Context, image domain.Image) error
}

type SubscriptionRepository

type SubscriptionRepository interface {
	FindBySubscriptionID(ctx context.Context, userID domain.UserID, subscriptionID domain.SubscriptionID) (*domain.Subscription, error)
	FindByUserID(ctx context.Context, userID domain.UserID) ([]domain.Subscription, error)
	Save(ctx context.Context, userID domain.UserID, subscriptions []domain.Subscription) error
}

type UserRepository

type UserRepository interface {
	FindById(ctx context.Context, id domain.UserID) (*domain.User, error)
	FindAll(ctx context.Context) ([]domain.User, error)
	Save(ctx context.Context, user domain.User) error
}

type WeatherService

type WeatherService interface {
	Get(ctx context.Context, clientID domain.YahooClientID, locations []domain.Location, observationOption ObservationOption) ([]domain.Weather, error)
}

Directories

Path Synopsis
Package mock_gateways is a generated GoMock package.
Package mock_gateways is a generated GoMock package.

Jump to

Keyboard shortcuts

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