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
Click to show internal directories.
Click to hide internal directories.