Documentation
¶
Index ¶
- func ReadJSON(p string, v interface{}) error
- func ReadKeyPair(p string) (*bmcrypto.KeyPair, error)
- func ReadTestFile(p string) []byte
- func ReadTestKey(p string) (*bmcrypto.PrivKey, *bmcrypto.PubKey, error)
- type RedisClientMock
- func (r *RedisClientMock) Del(ctx context.Context, keys ...string) (int64, error)
- func (r *RedisClientMock) Exists(ctx context.Context, key string) (int64, error)
- func (r *RedisClientMock) Get(ctx context.Context, key string) (string, error)
- func (r *RedisClientMock) Queue(f string, args ...interface{})
- func (r *RedisClientMock) SAdd(ctx context.Context, key string, members ...interface{}) (int64, error)
- func (r *RedisClientMock) SMembers(ctx context.Context, key string) ([]string, error)
- func (r *RedisClientMock) SRem(ctx context.Context, key string, members ...interface{}) (int64, error)
- func (r *RedisClientMock) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadKeyPair ¶
ReadKeyPair reads a path to a keypair
Types ¶
type RedisClientMock ¶
type RedisClientMock struct {
// contains filtered or unexported fields
}
RedisClientMock is a structure that can return mocked results from a redis. These results are queued by the Queue function, and fetched within the actual redis-methods. This system does not work directly when mocking redis but can be used by the redis-bridge.
func (*RedisClientMock) Queue ¶
func (r *RedisClientMock) Queue(f string, args ...interface{})
Queue will queue a set of return values that are returned when a specific method is called.
func (*RedisClientMock) SAdd ¶
func (r *RedisClientMock) SAdd(ctx context.Context, key string, members ...interface{}) (int64, error)
SAdd adds to a set
Click to show internal directories.
Click to hide internal directories.