station

package
v0.0.0-...-c17a42b Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	CreateStation(station *entities.Station) (*entities.Station, error)
	ReadStation(location string, date string) (*entities.Station, error)
}

Repository interface allows us to access the CRUD Operations in mongo here.

func NewRepo

func NewRepo(pool *redis.Pool) Repository

NewRepo is the single instance repo that is being created.

type Service

type Service interface {
	InsertStation(station *entities.Station) (*entities.Station, error)
	FetchStation(location string, startDate time.Time, endDate time.Time) (*[]entities.Station, error)
}

func NewService

func NewService(r Repository) Service

NewService is used to create a single instance of the service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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