repository

package
v0.0.0-...-34c5bf1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FixtureRepository

type FixtureRepository struct {
	// contains filtered or unexported fields
}

FixtureRepository holds an in-memory collection of fixtures

func Init

func Init(
	ctx context.Context,
	serviceName string,
	deviceRegistry deviceregistrydef.DeviceRegistryService,
) (*FixtureRepository, error)

Init loads devices from the device registry and populates a new repository

func New

func New(fixtures ...domain.Fixture) *FixtureRepository

New returns a repository holding the given fixtures

func (*FixtureRepository) Find

func (r *FixtureRepository) Find(id string) domain.Fixture

Find returns the fixture with the specified ID or nil if it doesn't exist

Jump to

Keyboard shortcuts

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