Documentation ¶
Overview ¶
Package mockstore Mocks all valkeyrie Store functions using testify.Mock.
Index ¶
- func New(endpoints []string, options *valkeyrie.Config) (store.Store, error)
- type Lock
- type Mock
- func (s *Mock) AtomicDelete(ctx context.Context, key string, previous *store.KVPair) (bool, error)
- func (s *Mock) AtomicPut(ctx context.Context, key string, value []byte, previous *store.KVPair, ...) (bool, *store.KVPair, error)
- func (s *Mock) Close() error
- func (s *Mock) Delete(ctx context.Context, key string) error
- func (s *Mock) DeleteTree(ctx context.Context, prefix string) error
- func (s *Mock) Exists(ctx context.Context, key string, opts *store.ReadOptions) (bool, error)
- func (s *Mock) Get(ctx context.Context, key string, opts *store.ReadOptions) (*store.KVPair, error)
- func (s *Mock) List(ctx context.Context, prefix string, opts *store.ReadOptions) ([]*store.KVPair, error)
- func (s *Mock) NewLock(ctx context.Context, key string, options *store.LockOptions) (store.Locker, error)
- func (s *Mock) Put(ctx context.Context, key string, value []byte, opts *store.WriteOptions) error
- func (s *Mock) Watch(ctx context.Context, key string, opts *store.ReadOptions) (<-chan *store.KVPair, error)
- func (s *Mock) WatchTree(ctx context.Context, prefix string, opts *store.ReadOptions) (<-chan []*store.KVPair, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mock ¶
type Mock struct { mock.Mock // Endpoints passed to InitializeMock. Endpoints []string // Options passed to InitializeMock. Options *valkeyrie.Config }
Mock store. Mocks all valkeyrie Store functions using testify.Mock.
func (*Mock) AtomicDelete ¶
AtomicDelete mock.
func (*Mock) AtomicPut ¶
func (s *Mock) AtomicPut(ctx context.Context, key string, value []byte, previous *store.KVPair, opts *store.WriteOptions) (bool, *store.KVPair, error)
AtomicPut mock.
func (*Mock) DeleteTree ¶
DeleteTree mock.
func (*Mock) List ¶
func (s *Mock) List(ctx context.Context, prefix string, opts *store.ReadOptions) ([]*store.KVPair, error)
List mock.
func (*Mock) NewLock ¶
func (s *Mock) NewLock(ctx context.Context, key string, options *store.LockOptions) (store.Locker, error)
NewLock mock.
Click to show internal directories.
Click to hide internal directories.