Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bag ¶
type Bag interface {
proto.Message
//AddEntry provides method to add MESSAGE TO Bag
AddEntry(Message)
//GetEntries returns list of all messages in the Bag
GetEntries() []Message
//NewBag returns a newBag of Message
NewBag() Bag
}
Bag interface represents a collection of message
type DTO ¶
type DTO interface {
data.Entity
//ToPB provides methods to convert DTO to proto-buf Message
ToPB() Message
}
DTO represents the interface every interface needs to implement
type DataModel ¶
type DataModel interface {
//NewBag returns a newBag of Message
NewBag() Bag
//CacheDuration provides cache duration in time.NanoSeconds
CacheDuration() int64
//LoadAll provides the method to load all the data
LoadAll() (Bag, error)
//GetDataName provides the data-name and should be unique
GetDataName() string
}
DataModel represents the datamodel being produced
type Message ¶
type Message interface {
proto.Message
//GetUniqueKey returns the primaryID of the string
GetUniqueKey() string
}
Message represents a single entity of the data
type MockDataModel ¶
MockDataModel mocks the DataModel implementation
func (MockDataModel) CacheDuration ¶
func (m MockDataModel) CacheDuration() int64
CacheDuration implements the DataModel Interface
func (MockDataModel) GetDataName ¶
func (m MockDataModel) GetDataName() string
GetDataName implements the DataModel interface
func (MockDataModel) LoadAll ¶
func (m MockDataModel) LoadAll() (Bag, error)
LoadAll implements the DataModel interface
func (MockDataModel) NewBag ¶
func (m MockDataModel) NewBag() Bag
NewBag implements the DataModel interface
Click to show internal directories.
Click to hide internal directories.