Documentation ¶
Index ¶
- type StubPersistence
- func (s *StubPersistence) All(collName string, query, docs interface{}) error
- func (s *StubPersistence) ApplicationExistsOps(serviceID string) []txn.Op
- func (s *StubPersistence) IncCharmModifiedVersionOps(serviceID string) []txn.Op
- func (s *StubPersistence) NewCleanupOp(kind, prefix string) txn.Op
- func (s *StubPersistence) One(collName, id string, doc interface{}) error
- func (s *StubPersistence) Run(buildTxn jujutxn.TransactionSource) error
- func (s *StubPersistence) RunTransaction(ops []txn.Op) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StubPersistence ¶
type StubPersistence struct { *testing.Stub RunFunc func(jujutxn.TransactionSource) error ReturnAll interface{} // homegenous(?) list of doc struct (not pointers) ReturnOne interface{} // a doc struct (not a pointer) ReturnApplicationExistsOps []txn.Op ReturnIncCharmModifiedVersionOps []txn.Op ReturnNewCleanupOp *txn.Op }
func NewStubPersistence ¶
func NewStubPersistence(stub *testing.Stub) *StubPersistence
func (*StubPersistence) All ¶
func (s *StubPersistence) All(collName string, query, docs interface{}) error
func (*StubPersistence) ApplicationExistsOps ¶
func (s *StubPersistence) ApplicationExistsOps(serviceID string) []txn.Op
func (*StubPersistence) IncCharmModifiedVersionOps ¶
func (s *StubPersistence) IncCharmModifiedVersionOps(serviceID string) []txn.Op
func (*StubPersistence) NewCleanupOp ¶
func (s *StubPersistence) NewCleanupOp(kind, prefix string) txn.Op
func (*StubPersistence) One ¶
func (s *StubPersistence) One(collName, id string, doc interface{}) error
func (*StubPersistence) Run ¶
func (s *StubPersistence) Run(buildTxn jujutxn.TransactionSource) error
func (*StubPersistence) RunTransaction ¶
func (s *StubPersistence) RunTransaction(ops []txn.Op) error
Click to show internal directories.
Click to hide internal directories.