Documentation
¶
Index ¶
- Constants
- type MemoryRepository
- func (repository *MemoryRepository) CreateExperiment(exp data.Experiment) error
- func (repository *MemoryRepository) DestroyExperiment(expID string)
- func (repository *MemoryRepository) GetExperiment(expID string) (data.Experiment, error)
- func (repository *MemoryRepository) GetExperiments() (map[string]data.Experiment, error)
- type RedisRepository
- func (repository *RedisRepository) DropExperiment(c context.Context, info *data.ExperimentInfo) (*data.Response, error)
- func (repository *RedisRepository) GetExperiment(c context.Context, info *data.ExperimentInfo) (*data.Experiment, error)
- func (repository *RedisRepository) GetExperiments(c context.Context, v *data.Void) (*data.Experiments, error)
- func (repository *RedisRepository) SaveExperiment(c context.Context, exp *data.Experiment) (*data.Response, error)
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)
Click to show internal directories.
Click to hide internal directories.