Documentation
¶
Index ¶
- type AppStatusHandlerMock
- func (ashm *AppStatusHandlerMock) AddUint64(key string, val uint64)
- func (ashm *AppStatusHandlerMock) Close()
- func (ashm *AppStatusHandlerMock) Decrement(key string)
- func (ashm *AppStatusHandlerMock) GetUint64(key string) uint64
- func (ashm *AppStatusHandlerMock) Increment(key string)
- func (ashm *AppStatusHandlerMock) IsInterfaceNil() bool
- func (ashm *AppStatusHandlerMock) SetInt64Value(key string, value int64)
- func (ashm *AppStatusHandlerMock) SetStringValue(key string, value string)
- func (ashm *AppStatusHandlerMock) SetUInt64Value(key string, value uint64)
- type AppStatusHandlerStub
- func (ashs *AppStatusHandlerStub) AddUint64(key string, value uint64)
- func (ashs *AppStatusHandlerStub) Close()
- func (ashs *AppStatusHandlerStub) Decrement(key string)
- func (ashs *AppStatusHandlerStub) Increment(key string)
- func (ashs *AppStatusHandlerStub) IsInterfaceNil() bool
- func (ashs *AppStatusHandlerStub) SetInt64Value(key string, value int64)
- func (ashs *AppStatusHandlerStub) SetStringValue(key string, value string)
- func (ashs *AppStatusHandlerStub) SetUInt64Value(key string, value uint64)
- type MarshalizerStub
- type StorerStub
- func (ss *StorerStub) ClearCache()
- func (ss *StorerStub) Close() error
- func (ss *StorerStub) DestroyUnit() error
- func (ss *StorerStub) Get(key []byte) ([]byte, error)
- func (ss *StorerStub) GetBulkFromEpoch(keys [][]byte, epoch uint32) (map[string][]byte, error)
- func (ss *StorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error)
- func (ss *StorerStub) Has(key []byte) error
- func (ss *StorerStub) IsInterfaceNil() bool
- func (ss *StorerStub) Put(key, data []byte) error
- func (ss *StorerStub) PutInEpoch(key, data []byte, epoch uint32) error
- func (ss *StorerStub) RangeKeys(handler func(key []byte, val []byte) bool)
- func (ss *StorerStub) Remove(key []byte) error
- func (ss *StorerStub) SearchFirst(key []byte) ([]byte, error)
- type Uint64ByteSliceConverterMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppStatusHandlerMock ¶
type AppStatusHandlerMock struct {
// contains filtered or unexported fields
}
AppStatusHandlerMock -
func NewAppStatusHandlerMock ¶
func NewAppStatusHandlerMock() *AppStatusHandlerMock
NewAppStatusHandlerMock -
func (*AppStatusHandlerMock) AddUint64 ¶
func (ashm *AppStatusHandlerMock) AddUint64(key string, val uint64)
AddUint64 -
func (*AppStatusHandlerMock) Decrement ¶
func (ashm *AppStatusHandlerMock) Decrement(key string)
Decrement -
func (*AppStatusHandlerMock) GetUint64 ¶
func (ashm *AppStatusHandlerMock) GetUint64(key string) uint64
GetUint64 -
func (*AppStatusHandlerMock) Increment ¶
func (ashm *AppStatusHandlerMock) Increment(key string)
Increment -
func (*AppStatusHandlerMock) IsInterfaceNil ¶
func (ashm *AppStatusHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*AppStatusHandlerMock) SetInt64Value ¶
func (ashm *AppStatusHandlerMock) SetInt64Value(key string, value int64)
SetInt64Value -
func (*AppStatusHandlerMock) SetStringValue ¶
func (ashm *AppStatusHandlerMock) SetStringValue(key string, value string)
SetStringValue -
func (*AppStatusHandlerMock) SetUInt64Value ¶
func (ashm *AppStatusHandlerMock) SetUInt64Value(key string, value uint64)
SetUInt64Value -
type AppStatusHandlerStub ¶
type AppStatusHandlerStub struct {
AddUint64Handler func(key string, value uint64)
IncrementHandler func(key string)
DecrementHandler func(key string)
SetUInt64ValueHandler func(key string, value uint64)
SetInt64ValueHandler func(key string, value int64)
SetStringValueHandler func(key string, value string)
CloseHandler func()
}
AppStatusHandlerStub is a stub implementation of AppStatusHandler
func (*AppStatusHandlerStub) AddUint64 ¶
func (ashs *AppStatusHandlerStub) AddUint64(key string, value uint64)
AddUint64 will call the handler of the stub for incrementing
func (*AppStatusHandlerStub) Close ¶
func (ashs *AppStatusHandlerStub) Close()
Close will call the handler of the stub for closing
func (*AppStatusHandlerStub) Decrement ¶
func (ashs *AppStatusHandlerStub) Decrement(key string)
Decrement will call the handler of the stub for decrementing
func (*AppStatusHandlerStub) Increment ¶
func (ashs *AppStatusHandlerStub) Increment(key string)
Increment will call the handler of the stub for incrementing
func (*AppStatusHandlerStub) IsInterfaceNil ¶
func (ashs *AppStatusHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*AppStatusHandlerStub) SetInt64Value ¶
func (ashs *AppStatusHandlerStub) SetInt64Value(key string, value int64)
SetInt64Value will call the handler of the stub for setting an int64 value
func (*AppStatusHandlerStub) SetStringValue ¶
func (ashs *AppStatusHandlerStub) SetStringValue(key string, value string)
SetStringValue will call the handler of the stub for setting an string value
func (*AppStatusHandlerStub) SetUInt64Value ¶
func (ashs *AppStatusHandlerStub) SetUInt64Value(key string, value uint64)
SetUInt64Value will call the handler of the stub for setting an uint64 value
type MarshalizerStub ¶
type MarshalizerStub struct {
MarshalCalled func(obj interface{}) ([]byte, error)
UnmarshalCalled func(obj interface{}, buff []byte) error
}
MarshalizerStub -
func (*MarshalizerStub) IsInterfaceNil ¶
func (ms *MarshalizerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MarshalizerStub) Marshal ¶
func (ms *MarshalizerStub) Marshal(obj interface{}) ([]byte, error)
Marshal -
func (*MarshalizerStub) Unmarshal ¶
func (ms *MarshalizerStub) Unmarshal(obj interface{}, buff []byte) error
Unmarshal -
type StorerStub ¶
type StorerStub struct {
PutCalled func(key, data []byte) error
PutInEpochCalled func(key, data []byte, epoch uint32) error
GetCalled func(key []byte) ([]byte, error)
GetFromEpochCalled func(key []byte, epoch uint32) ([]byte, error)
HasCalled func(key []byte) error
HasInEpochCalled func(key []byte, epoch uint32) error
SearchFirstCalled func(key []byte) ([]byte, error)
RemoveCalled func(key []byte) error
ClearCacheCalled func()
DestroyUnitCalled func() error
CloseCalled func() error
RangeKeysCalled func(handler func(key []byte, val []byte) bool)
GetBulkFromEpochCalled func(keys [][]byte, epoch uint32) (map[string][]byte, error)
}
StorerStub -
func (*StorerStub) GetBulkFromEpoch ¶ added in v1.0.147
GetBulkFromEpoch -
func (*StorerStub) GetFromEpoch ¶
func (ss *StorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error)
GetFromEpoch -
func (*StorerStub) IsInterfaceNil ¶
func (ss *StorerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*StorerStub) PutInEpoch ¶ added in v1.1.1
func (ss *StorerStub) PutInEpoch(key, data []byte, epoch uint32) error
PutInEpoch -
func (*StorerStub) RangeKeys ¶ added in v1.0.138
func (ss *StorerStub) RangeKeys(handler func(key []byte, val []byte) bool)
RangeKeys -
func (*StorerStub) SearchFirst ¶
func (ss *StorerStub) SearchFirst(key []byte) ([]byte, error)
SearchFirst -
type Uint64ByteSliceConverterMock ¶
type Uint64ByteSliceConverterMock struct {
ToByteSliceCalled func(uint64) []byte
ToUint64Called func([]byte) (uint64, error)
}
Uint64ByteSliceConverterMock converts byte slice to/from uint64
func (*Uint64ByteSliceConverterMock) IsInterfaceNil ¶
func (u *Uint64ByteSliceConverterMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*Uint64ByteSliceConverterMock) ToByteSlice ¶
func (u *Uint64ByteSliceConverterMock) ToByteSlice(p uint64) []byte
ToByteSlice is a mock implementation for Uint64ByteSliceConverter