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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NotificationService

type NotificationService struct {
	Client infrastructure.SlackClient
}

func (*NotificationService) SendForecastMessage

func (s *NotificationService) SendForecastMessage(ctx context.Context, recipient domain.Recipient, message gateways.ForecastMessage) error

type PNGRepository

type PNGRepository struct{}

func (*PNGRepository) FindById

func (r *PNGRepository) FindById(ctx context.Context, id domain.ImageID) (*domain.Image, error)

func (*PNGRepository) RemoveOlderThan

func (r *PNGRepository) RemoveOlderThan(ctx context.Context, t time.Time) (int, error)

func (*PNGRepository) Save

func (r *PNGRepository) Save(ctx context.Context, image domain.Image) error

type SubscriptionRepository

type SubscriptionRepository struct{}

func (*SubscriptionRepository) FindBySubscriptionID

func (r *SubscriptionRepository) FindBySubscriptionID(ctx context.Context, userID domain.UserID, subscriptionID domain.SubscriptionID) (*domain.Subscription, error)

func (*SubscriptionRepository) FindByUserID

func (r *SubscriptionRepository) FindByUserID(ctx context.Context, userID domain.UserID) ([]domain.Subscription, error)

func (*SubscriptionRepository) Save

func (r *SubscriptionRepository) Save(ctx context.Context, userID domain.UserID, subscriptions []domain.Subscription) error

type UserRepository

type UserRepository struct{}

func (*UserRepository) FindAll

func (r *UserRepository) FindAll(ctx context.Context) ([]domain.User, error)

func (*UserRepository) FindById

func (r *UserRepository) FindById(ctx context.Context, id domain.UserID) (*domain.User, error)

func (*UserRepository) Save

func (r *UserRepository) Save(ctx context.Context, user domain.User) error

type WeatherService

type WeatherService struct {
	Client infrastructure.WeatherClient
}

func (*WeatherService) Get

func (s *WeatherService) Get(ctx context.Context, clientID domain.YahooClientID, locations []domain.Location, observationOption gateways.ObservationOption) ([]domain.Weather, error)

Directories

Path Synopsis
mock_gateways
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