Documentation ¶
Index ¶
- Constants
- Variables
- func FakeNewCollectionDialer(c taskmanager.Task) ...
- 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 FakeRenderer
- type FakeResponseBody
- type FakeSku
- type FakeTask
- type FakeTaskManager
- func (s *FakeTaskManager) FindAndStallTaskForCaller(callerName string) (t *taskmanager.Task, err error)
- func (s *FakeTaskManager) FindTask(id string) (t *taskmanager.Task, err error)
- func (s *FakeTaskManager) NewTask(callerName string, profile taskmanager.ProfileType, status string) (t *taskmanager.Task)
- func (s *FakeTaskManager) SaveTask(t *taskmanager.Task) (*taskmanager.Task, error)
- func (s *FakeTaskManager) ScheduleTask(t *taskmanager.Task, expireTime time.Time)
- type FakeVCDClient
- func (s *FakeVCDClient) Auth(username, password string) (err error)
- func (s *FakeVCDClient) DeployVApp(templateName, templateHref, vcdHref string) (vapp *vcloudclient.VApp, err error)
- func (s *FakeVCDClient) PollTaskURL(taskURL string) (task *vcloudclient.TaskElem, err error)
- func (s *FakeVCDClient) QueryTemplate(templateName string) (vappTemplate *vcloudclient.VAppTemplateRecord, err error)
- func (s *FakeVCDClient) UnDeployVApp(vappID string) (task *vcloudclient.TaskElem, err error)
- type MockClientDoer
- type MockHeritageClient
- type MockMongo
- type MockPersistence
Constants ¶
const ( FakeCollectionHasChanges = 1 FakeCollectionHasNoChanges = 0 FakeCollectionHasNilChangeInfo = -1 //VcapServicesFormatter - VcapServicesFormatter = `` /* 461-byte string literal not displayed */ //VcapApplicationFormatter - VcapApplicationFormatter = `` /* 507-byte string literal not displayed */ )
Variables ¶
var ( //FakeKeyCheck - FakeKeyCheck martini.Handler = func(log *log.Logger, res http.ResponseWriter, req *http.Request) {} //MockLogger - MockLogger = log.New(&buf, "logger: ", log.Lshortfile) )
Functions ¶
func FakeNewCollectionDialer ¶
func FakeNewCollectionDialer(c taskmanager.Task) func(url, dbname, collectionname string) (col integrations.Collection, err error)
FakeNewCollectionDialer -
Types ¶
type FakeCollection ¶
type FakeCollection struct { mgo.Collection ControlTask taskmanager.Task ErrControl error FakeChangeInfo *mgo.ChangeInfo ErrFindAndModify error FakeResultFindAndModify interface{} AssignResult func(result, setValue interface{}) }
FakeCollection -
func NewFakeCollection ¶ added in v0.0.73
func NewFakeCollection(updated int) *FakeCollection
NewFakeCollection ====
func (*FakeCollection) FindAndModify ¶ added in v0.0.62
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 FakeRenderer ¶
FakeRenderer -
type FakeResponseBody ¶ added in v0.0.52
FakeResponseBody - a fake response body object
func (FakeResponseBody) Close ¶ added in v0.0.52
func (FakeResponseBody) Close() error
Close - close fake body
type FakeSku ¶ added in v0.0.60
type FakeSku struct { skurepo.Sku ProcurementTask *taskmanager.Task ReStockTask *taskmanager.Task }
FakeSku -- a fake sku object
func MakeFakeSku ¶ added in v0.0.119
func MakeFakeSku(status string) (*FakeSku, *taskmanager.Task, *taskmanager.Task)
MakeFakeSku ---
func (*FakeSku) Procurement ¶ added in v0.0.60
func (s *FakeSku) Procurement() (task *taskmanager.Task)
Procurement --
func (*FakeSku) ReStock ¶ added in v0.0.60
func (s *FakeSku) ReStock() (task *taskmanager.Task)
ReStock --
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 ¶ added in v0.0.58
type FakeTaskManager struct { ExpireEmitter chan int64 SpyTaskSaved *taskmanager.Task ReturnedTask *taskmanager.Task ReturnedErr error }
FakeTaskManager - this is a fake representation of the task manager
func (*FakeTaskManager) FindAndStallTaskForCaller ¶ added in v0.0.64
func (s *FakeTaskManager) FindAndStallTaskForCaller(callerName string) (t *taskmanager.Task, err error)
FindAndStallTaskForCaller --
func (*FakeTaskManager) FindTask ¶ added in v0.0.58
func (s *FakeTaskManager) FindTask(id string) (t *taskmanager.Task, err error)
FindTask --
func (*FakeTaskManager) NewTask ¶ added in v0.0.58
func (s *FakeTaskManager) NewTask(callerName string, profile taskmanager.ProfileType, status string) (t *taskmanager.Task)
NewTask --
func (*FakeTaskManager) SaveTask ¶ added in v0.0.58
func (s *FakeTaskManager) SaveTask(t *taskmanager.Task) (*taskmanager.Task, error)
SaveTask --
func (*FakeTaskManager) ScheduleTask ¶ added in v0.0.99
func (s *FakeTaskManager) ScheduleTask(t *taskmanager.Task, expireTime time.Time)
ScheduleTask ---
type FakeVCDClient ¶ added in v0.0.55
type FakeVCDClient struct { FakeVAppTemplateRecord *vcloudclient.VAppTemplateRecord FakeVApp *vcloudclient.VApp ErrUnDeployFake error ErrDeployFake error ErrQueryFake error ErrAuthFake error ErrPollTaskURL error FakeTaskElem *vcloudclient.TaskElem }
FakeVCDClient - this is a fake vcdclient object
func (*FakeVCDClient) Auth ¶ added in v0.0.55
func (s *FakeVCDClient) Auth(username, password string) (err error)
Auth - fake out making an auth call
func (*FakeVCDClient) DeployVApp ¶ added in v0.0.55
func (s *FakeVCDClient) DeployVApp(templateName, templateHref, vcdHref string) (vapp *vcloudclient.VApp, err error)
DeployVApp - fake out calling deploy vapp
func (*FakeVCDClient) PollTaskURL ¶ added in v0.0.65
func (s *FakeVCDClient) PollTaskURL(taskURL string) (task *vcloudclient.TaskElem, err error)
PollTaskURL -- fake a poll url call
func (*FakeVCDClient) QueryTemplate ¶ added in v0.0.55
func (s *FakeVCDClient) QueryTemplate(templateName string) (vappTemplate *vcloudclient.VAppTemplateRecord, err error)
QueryTemplate - fake querying for a template
func (*FakeVCDClient) UnDeployVApp ¶ added in v0.0.57
func (s *FakeVCDClient) UnDeployVApp(vappID string) (task *vcloudclient.TaskElem, err error)
UnDeployVApp - executes a fake undeploy on a fake client
type MockClientDoer ¶
MockClientDoer -
type MockHeritageClient ¶
MockHeritageClient -
func (*MockHeritageClient) CreateAuthRequest ¶
func (s *MockHeritageClient) CreateAuthRequest(verb, requestURL, path string, args interface{}) (*http.Request, error)
CreateAuthRequest -
func (*MockHeritageClient) HTTPClient ¶ added in v0.0.52
func (s *MockHeritageClient) HTTPClient() ccclient.ClientDoer
HTTPClient -
func (*MockHeritageClient) Login ¶
func (s *MockHeritageClient) Login() (c *ccclient.Client, err error)
Login -
type MockMongo ¶
type MockMongo struct { Err error Result interface{} }
MockMongo -
func (*MockMongo) Collection ¶
func (s *MockMongo) Collection() pezdispenser.Persistence
Collection -
type MockPersistence ¶
type MockPersistence struct { Result interface{} Err error }
MockPersistence -
func (*MockPersistence) FindOne ¶
func (s *MockPersistence) FindOne(query interface{}, result interface{}) (err error)
FindOne -
func (*MockPersistence) Remove ¶
func (s *MockPersistence) Remove(selector interface{}) (err error)
Remove -
func (*MockPersistence) Upsert ¶
func (s *MockPersistence) Upsert(selector interface{}, update interface{}) (err error)
Upsert -