Documentation ¶
Overview ¶
Code generated by counterfeiter. DO NOT EDIT.
Code generated by counterfeiter. DO NOT EDIT.
Index ¶
- type ConfigManager
- func (m *ConfigManager) Delete(key *config.Criteria) error
- func (m *ConfigManager) Query(criteria *config.Criteria) ([]*config.KeyValue, error)
- func (m *ConfigManager) Save(txID string, config *config.Config) error
- func (m *ConfigManager) WithError(err error) *ConfigManager
- func (m *ConfigManager) WithQueryResults(criteria *config.Criteria, results []*config.KeyValue) *ConfigManager
- type KVResultsIter
- type StateRetriever
- type StateRetrieverProvider
- type StateStore
- type StoreProvider
- type Validator
- func (fake *Validator) Invocations() map[string][][]interface{}
- func (fake *Validator) Validate(kv *config.KeyValue) error
- func (fake *Validator) ValidateArgsForCall(i int) *config.KeyValue
- func (fake *Validator) ValidateCallCount() int
- func (fake *Validator) ValidateReturns(result1 error)
- func (fake *Validator) ValidateReturnsOnCall(i int, result1 error)
- type ValidatorRegistry
- func (fake *ValidatorRegistry) Invocations() map[string][][]interface{}
- func (fake *ValidatorRegistry) ValidatorForKey(key *config.Key) config.Validator
- func (fake *ValidatorRegistry) ValidatorForKeyArgsForCall(i int) *config.Key
- func (fake *ValidatorRegistry) ValidatorForKeyCallCount() int
- func (fake *ValidatorRegistry) ValidatorForKeyReturns(result1 config.Validator)
- func (fake *ValidatorRegistry) ValidatorForKeyReturnsOnCall(i int, result1 config.Validator)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigManager ¶
type ConfigManager struct {
// contains filtered or unexported fields
}
ConfigManager manages configuration in ledger
func NewConfigMgr ¶
func NewConfigMgr() *ConfigManager
NewConfigMgr returns a new configuration manager
func (*ConfigManager) Delete ¶
func (m *ConfigManager) Delete(key *config.Criteria) error
Delete deletes configuration from the ledger.
func (*ConfigManager) Save ¶
func (m *ConfigManager) Save(txID string, config *config.Config) error
Save saves the configuration to the ledger. The submitted payload should be in form of Config
func (*ConfigManager) WithError ¶
func (m *ConfigManager) WithError(err error) *ConfigManager
WithError injects an error
func (*ConfigManager) WithQueryResults ¶
func (m *ConfigManager) WithQueryResults(criteria *config.Criteria, results []*config.KeyValue) *ConfigManager
WithQueryResults sets the results for the given key
type KVResultsIter ¶
type KVResultsIter struct {
// contains filtered or unexported fields
}
KVResultsIter is a mock key-value results iterator
func NewKVResultsIter ¶
func NewKVResultsIter(it commonledger.ResultsIterator) *KVResultsIter
NewKVResultsIter returns a new KVResultsIter
func (*KVResultsIter) HasNext ¶
func (m *KVResultsIter) HasNext() bool
HasNext returns true if there are more items
func (*KVResultsIter) Next ¶
func (m *KVResultsIter) Next() (*queryresult.KV, error)
Next returns the next item
func (*KVResultsIter) WithCloseError ¶
func (m *KVResultsIter) WithCloseError(err error) *KVResultsIter
WithCloseError injects an error into the mock iterator
type StateRetriever ¶
type StateRetriever struct { *mocks.QueryExecutor // contains filtered or unexported fields }
StateRetriever is a mock implementation of StateRetriever
func NewStateRetriever ¶
func NewStateRetriever() *StateRetriever
NewStateRetriever returns a mock StateRetriever
func (*StateRetriever) GetStateByPartialCompositeKey ¶
func (m *StateRetriever) GetStateByPartialCompositeKey(namespace, objectType string, attributes []string) (api.ResultsIterator, error)
GetStateByPartialCompositeKey returns an iterator for the range of keys/values for the given partial keys
func (*StateRetriever) WithKVResultsIteratorProvider ¶
func (m *StateRetriever) WithKVResultsIteratorProvider(p func(it commonledger.ResultsIterator) *KVResultsIter) *StateRetriever
WithKVResultsIteratorProvider sets the KV results iterator provider
type StateRetrieverProvider ¶
type StateRetrieverProvider struct {
// contains filtered or unexported fields
}
StateRetrieverProvider is a mock implementation of RetrieverProvider
func NewStateRetrieverProvider ¶
func NewStateRetrieverProvider() *StateRetrieverProvider
NewStateRetrieverProvider returns a mock StateRetrieverProvider
func (*StateRetrieverProvider) GetStateRetriever ¶
func (m *StateRetrieverProvider) GetStateRetriever() (api.StateRetriever, error)
GetStateRetriever returns a mock StateRetriever
func (*StateRetrieverProvider) WithError ¶
func (m *StateRetrieverProvider) WithError(err error) *StateRetrieverProvider
WithError injects the provider with an error
func (*StateRetrieverProvider) WithStateRetriever ¶
func (m *StateRetrieverProvider) WithStateRetriever(r api.StateRetriever) *StateRetrieverProvider
WithStateRetriever sets the StateRetriever
type StateStore ¶
type StateStore struct { *StateRetriever // contains filtered or unexported fields }
StateStore is a mock StateStore
func (*StateStore) DelState ¶
func (m *StateStore) DelState(namespace, key string) error
DelState deletes the given key
func (*StateStore) PutState ¶
func (m *StateStore) PutState(namespace, key string, value []byte) error
PutState saves the given state
func (*StateStore) WithRetrieverError ¶
func (m *StateStore) WithRetrieverError(err error) *StateStore
WithRetrieverError injects the state retriever with an error
func (*StateStore) WithStoreError ¶
func (m *StateStore) WithStoreError(err error) *StateStore
WithStoreError injects the state store with an error
type StoreProvider ¶
type StoreProvider struct {
// contains filtered or unexported fields
}
StoreProvider is a mock StoreProvider
func NewStoreProvider ¶
func NewStoreProvider() *StoreProvider
NewStoreProvider returns a mock StoreProvider
func (*StoreProvider) GetStateRetriever ¶
func (m *StoreProvider) GetStateRetriever() (api.StateRetriever, error)
GetStateRetriever returns a mock StateRetriever
func (*StoreProvider) GetStore ¶
func (m *StoreProvider) GetStore() (api.StateStore, error)
GetStore returns a mock StateStore
func (*StoreProvider) WithError ¶
func (m *StoreProvider) WithError(err error) *StoreProvider
WithError injects the store provider with an error
func (*StoreProvider) WithStore ¶
func (m *StoreProvider) WithStore(store api.StateStore) *StoreProvider
WithStore sets the StateStore
type Validator ¶ added in v0.1.2
type Validator struct { ValidateStub func(kv *config.KeyValue) error // contains filtered or unexported fields }
func (*Validator) Invocations ¶ added in v0.1.2
func (*Validator) ValidateArgsForCall ¶ added in v0.1.2
func (*Validator) ValidateCallCount ¶ added in v0.1.2
func (*Validator) ValidateReturns ¶ added in v0.1.2
func (*Validator) ValidateReturnsOnCall ¶ added in v0.1.2
type ValidatorRegistry ¶ added in v0.1.2
type ValidatorRegistry struct { ValidatorForKeyStub func(key *config.Key) config.Validator // contains filtered or unexported fields }
func (*ValidatorRegistry) Invocations ¶ added in v0.1.2
func (fake *ValidatorRegistry) Invocations() map[string][][]interface{}
func (*ValidatorRegistry) ValidatorForKey ¶ added in v0.1.2
func (fake *ValidatorRegistry) ValidatorForKey(key *config.Key) config.Validator
func (*ValidatorRegistry) ValidatorForKeyArgsForCall ¶ added in v0.1.2
func (fake *ValidatorRegistry) ValidatorForKeyArgsForCall(i int) *config.Key
func (*ValidatorRegistry) ValidatorForKeyCallCount ¶ added in v0.1.2
func (fake *ValidatorRegistry) ValidatorForKeyCallCount() int
func (*ValidatorRegistry) ValidatorForKeyReturns ¶ added in v0.1.2
func (fake *ValidatorRegistry) ValidatorForKeyReturns(result1 config.Validator)
func (*ValidatorRegistry) ValidatorForKeyReturnsOnCall ¶ added in v0.1.2
func (fake *ValidatorRegistry) ValidatorForKeyReturnsOnCall(i int, result1 config.Validator)