Documentation ¶
Index ¶
- type FakeCollection
- func (s *FakeCollection) Close()
- func (s *FakeCollection) FindAndModify(selector interface{}, update interface{}, result interface{}) (info *mgo.ChangeInfo, err error)
- func (s *FakeCollection) FindOne(id string, result interface{}) (err error)
- func (s *FakeCollection) UpsertID(id interface{}, result interface{}) (changInfo *mgo.ChangeInfo, err error)
- func (s *FakeCollection) Wake()
- type FakeTask
- type FakeTaskManager
- func (s *FakeTaskManager) FindAndStallTaskForCaller(callerName string) (t coda.Task, err error)
- func (s *FakeTaskManager) FindTask(id string) (t coda.Task, err error)
- func (s *FakeTaskManager) NewTask(callerName string, profile coda.ProfileType, status string) (t coda.Task)
- func (s *FakeTaskManager) SaveTask(t coda.Task) (coda.Task, error)
- func (s *FakeTaskManager) ScheduleTask(t coda.Task, expireTime time.Time) coda.Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeCollection ¶
type FakeCollection struct { ControlTask coda.Task ErrControl error FakeChangeInfo *mgo.ChangeInfo ErrFindAndModify error FakeResultFindAndModify interface{} AssignResult func(result, setValue interface{}) }
FakeCollection -
func (*FakeCollection) FindAndModify ¶
func (s *FakeCollection) FindAndModify(selector interface{}, update interface{}, result interface{}) (info *mgo.ChangeInfo, err error)
FindAndModify -
func (*FakeCollection) FindOne ¶
func (s *FakeCollection) FindOne(id string, result interface{}) (err error)
FindOne -
func (*FakeCollection) UpsertID ¶
func (s *FakeCollection) UpsertID(id interface{}, result interface{}) (changInfo *mgo.ChangeInfo, err error)
UpsertID -
type FakeTask ¶
type FakeTask struct { ID bson.ObjectId `bson:"_id"` Timestamp time.Time `bson:"timestamp"` Status string `bson:"status"` MetaData map[string]interface{} `bson:"metadata"` PrivateMetaData map[string]interface{} `bson:"private_metadata"` }
FakeTask -
type FakeTaskManager ¶
type FakeTaskManager struct { ExpireEmitter chan int64 ReturnedTask coda.Task ReturnedErr error DefaultTaskExpires int64 }
FakeTaskManager - this is a fake representation of the task manager
func (*FakeTaskManager) FindAndStallTaskForCaller ¶
func (s *FakeTaskManager) FindAndStallTaskForCaller(callerName string) (t coda.Task, err error)
FindAndStallTaskForCaller --
func (*FakeTaskManager) FindTask ¶
func (s *FakeTaskManager) FindTask(id string) (t coda.Task, err error)
FindTask --
func (*FakeTaskManager) NewTask ¶
func (s *FakeTaskManager) NewTask(callerName string, profile coda.ProfileType, status string) (t coda.Task)
NewTask --
func (*FakeTaskManager) ScheduleTask ¶
ScheduleTask ---
Click to show internal directories.
Click to hide internal directories.