repository

package
v0.0.0-...-87346ed Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAreaFromHistory

func NewAreaFromHistory(events []storage.AreaEvent) *domain.Area

func NewFarmFromHistory

func NewFarmFromHistory(events []storage.FarmEvent) *domain.Farm

func NewMaterialFromHistory

func NewMaterialFromHistory(events []storage.MaterialEvent) *domain.Material

func NewReservoirFromHistory

func NewReservoirFromHistory(events []storage.ReservoirEvent) *domain.Reservoir

Types

type AreaEventRepository

type AreaEventRepository interface {
	Save(uid uuid.UUID, latestVersion int, events []interface{}) <-chan error
}

type AreaReadRepository

type AreaReadRepository interface {
	Save(areaRead *storage.AreaRead) <-chan error
}

type FarmEventRepository

type FarmEventRepository interface {
	Save(uid uuid.UUID, latestVersion int, events []interface{}) <-chan error
}

type FarmReadRepository

type FarmReadRepository interface {
	Save(farmRead *storage.FarmRead) <-chan error
}

type MaterialEventRepository

type MaterialEventRepository interface {
	Save(uid uuid.UUID, latestVersion int, events []interface{}) <-chan error
}

type MaterialEventTypeWrapper

type MaterialEventTypeWrapper struct {
	Type string
	Data interface{}
}

func (MaterialEventTypeWrapper) Code

type MaterialReadRepository

type MaterialReadRepository interface {
	Save(materialRead *storage.MaterialRead) <-chan error
}

type RepositoryResult

type RepositoryResult struct {
	Result interface{}
	Error  error
}

RepositoryResult is a struct to wrap repository result so its easy to use it in channel

type ReservoirEventRepository

type ReservoirEventRepository interface {
	Save(uid uuid.UUID, latestVersion int, events []interface{}) <-chan error
}

type ReservoirReadRepository

type ReservoirReadRepository interface {
	Save(reservoirRead *storage.ReservoirRead) <-chan error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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