repositories

package
v0.0.0-...-c9c0c0f Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const HKEY = "REPOSITORY"

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryRepository

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

MemoryRepository is a local, in-memory experiment repository. It is implemented mainly for testing purposes.

func NewMemoryRepository

func NewMemoryRepository() *MemoryRepository

NewMemoryRepository returns a new MemoryRepository object.

func (*MemoryRepository) CreateExperiment

func (repository *MemoryRepository) CreateExperiment(exp data.Experiment) error

CreateExperiment saves an experiment with the given description in the repository.

func (*MemoryRepository) DestroyExperiment

func (repository *MemoryRepository) DestroyExperiment(expID string)

DestroyExperiment removes the experiment with the given id from the repository.

func (*MemoryRepository) GetExperiment

func (repository *MemoryRepository) GetExperiment(expID string) (data.Experiment, error)

GetExperiment returns the experiment description of the experiment with the specified experiment id.

func (*MemoryRepository) GetExperiments

func (repository *MemoryRepository) GetExperiments() (map[string]data.Experiment, error)

GetExperiments returns all the current experiments form the memory.

type RedisRepository

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

func NewRedisRepository

func NewRedisRepository(addr, password string) (*RedisRepository, error)

func (*RedisRepository) DropExperiment

func (repository *RedisRepository) DropExperiment(c context.Context, info *data.ExperimentInfo) (*data.Response, error)

func (*RedisRepository) GetExperiment

func (repository *RedisRepository) GetExperiment(c context.Context, info *data.ExperimentInfo) (*data.Experiment, error)

func (*RedisRepository) GetExperiments

func (repository *RedisRepository) GetExperiments(c context.Context, v *data.Void) (*data.Experiments, error)

func (*RedisRepository) SaveExperiment

func (repository *RedisRepository) SaveExperiment(c context.Context, exp *data.Experiment) (*data.Response, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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