sources

package
v0.0.0-...-e03385f Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2018 License: Apache-2.0 Imports: 3 Imported by: 6

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

type MockDataModel struct {
	mock.Mock
}

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

Directories

Path Synopsis
datamodel
dummy
Package dummy is a generated protocol buffer package.
Package dummy is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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