datasource

package
Version: v0.0.0-...-6d92e63 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2020 License: MIT Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseHelper

type DatabaseHelper struct {
	Store map[int]model.Promotion
}

DatabaseHelper is the struct

func GetDatabaseMock

func GetDatabaseMock() DatabaseHelper

GetDatabaseMock is the Mock database in memory

type PromotionDataSource

type PromotionDataSource interface {
	Add(data *model.Promotion) error
	GetAll() ([]model.Promotion, error)
	Get(id int) (model.Promotion, error)
}

PromotionDataSource is the interface

func NewPromotionDataSource

func NewPromotionDataSource(db DatabaseHelper) PromotionDataSource

NewPromotionDataSource is the new promotion datasource

Jump to

Keyboard shortcuts

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