Documentation ¶
Index ¶
- Variables
- func SyncGoalIDs(goalID string, goalIDs []string) (string, []string)
- type Experiment
- func (e *Experiment) ChangeDescription(description string) error
- func (e *Experiment) ChangeName(name string) error
- func (e *Experiment) ChangePeriod(startAt, stopAt int64) error
- func (e *Experiment) ChangeStartAt(startAt int64) error
- func (e *Experiment) ChangeStopAt(stopAt int64) error
- func (e *Experiment) Finish() error
- func (e *Experiment) IsNotFinished(t time.Time) bool
- func (e *Experiment) SetArchived() error
- func (e *Experiment) SetDeleted() error
- func (e *Experiment) Start() error
- func (e *Experiment) Stop() error
- type Goal
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrExperimentBeforeStart = errors.New("experiment: start timestamp is greater than now") ErrExperimentBeforeStop = errors.New("experiment: stop timestamp is greater than now") ErrExperimentStatusInvalid = errors.New("experiment: experiment status is invalid") ErrExperimentAlreadyStopped = errors.New("experiment: experiment is already stopped") ErrExperimentStartIsAfterStop = errors.New("experiment: start is after stop timestamp") ErrExperimentStopIsBeforeStart = errors.New("experiment: stop is before start timestamp") ErrExperimentStopIsBeforeNow = errors.New("experiment: stop is same or older than now timestamp") )
Functions ¶
Types ¶
type Experiment ¶
type Experiment struct {
*experimentproto.Experiment
}
func NewExperiment ¶
func (*Experiment) ChangeDescription ¶
func (e *Experiment) ChangeDescription(description string) error
func (*Experiment) ChangeName ¶
func (e *Experiment) ChangeName(name string) error
func (*Experiment) ChangePeriod ¶
func (e *Experiment) ChangePeriod(startAt, stopAt int64) error
func (*Experiment) ChangeStartAt ¶
func (e *Experiment) ChangeStartAt(startAt int64) error
func (*Experiment) ChangeStopAt ¶
func (e *Experiment) ChangeStopAt(stopAt int64) error
func (*Experiment) Finish ¶
func (e *Experiment) Finish() error
func (*Experiment) IsNotFinished ¶
func (e *Experiment) IsNotFinished(t time.Time) bool
IsNotFinished returns true if the status is either waiting or running.
func (*Experiment) SetArchived ¶
func (e *Experiment) SetArchived() error
func (*Experiment) SetDeleted ¶
func (e *Experiment) SetDeleted() error
func (*Experiment) Start ¶
func (e *Experiment) Start() error
func (*Experiment) Stop ¶
func (e *Experiment) Stop() error
Click to show internal directories.
Click to hide internal directories.