interactors

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DetailsFetcher added in v0.2.0

type DetailsFetcher interface {
	GetFuelStationsDetails(
		ctx context.Context,
		stationsIDs []string,
		outputStations chan<- entities.Station,
	) error
}

type GetFuelStations

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

func NewGetFuelStations

func NewGetFuelStations(
	logger *zap.SugaredLogger,
	fetcher StationsFetcher,
	city string,
) *GetFuelStations

func (*GetFuelStations) Execute

func (u *GetFuelStations) Execute(ctx context.Context) ([]entities.Station, error)

type GetFuelStationsDetails added in v0.2.0

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

func NewGetFuelStationsDetails added in v0.2.0

func NewGetFuelStationsDetails(
	logger *zap.SugaredLogger,
	fetcher DetailsFetcher,
) *GetFuelStationsDetails

func (*GetFuelStationsDetails) Execute added in v0.2.0

func (u *GetFuelStationsDetails) Execute(ctx context.Context, stations []entities.Station) ([]entities.Station, error)

type PersistFuelStations

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

func NewPersistFuelStations

func NewPersistFuelStations(
	logger *zap.SugaredLogger,
	persistor StationsPersistor,
) *PersistFuelStations

func (*PersistFuelStations) Execute

func (u *PersistFuelStations) Execute(ctx context.Context, stations []entities.Station) ([]string, error)

type StationsFetcher

type StationsFetcher interface {
	GetFuelStations(ctx context.Context) ([]entities.Station, error)
}

type StationsPersistor

type StationsPersistor interface {
	PersistGasStation(station *entities.Station) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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