Documentation ¶
Index ¶
- Constants
- func HandleRedisErr(err error, action, key string) error
- type DebugDataGateway
- type MockDataGatewayENS
- func (s *MockDataGatewayENS) DelENS(ctx context.Context, ens *entity.ENS) error
- func (s *MockDataGatewayENS) GetENS(ctx context.Context, ensID string) (*entity.ENS, error)
- func (s *MockDataGatewayENS) GetENSes(context.Context) ([]*entity.ENS, error)
- func (s *MockDataGatewayENS) SetENS(ctx context.Context, ens *entity.ENS) error
- func (s *MockDataGatewayENS) WriteLogs() []WriteLog
- type MockDataGatewayPoolFactory
- func (s *MockDataGatewayPoolFactory) DelPool(ctx context.Context, pool *entity.Uniswapv3PoolCreated) error
- func (s *MockDataGatewayPoolFactory) GetPool(ctx context.Context, lpAddress common.Address) (*entity.Uniswapv3PoolCreated, error)
- func (s *MockDataGatewayPoolFactory) GetPools(ctx context.Context) ([]*entity.Uniswapv3PoolCreated, error)
- func (s *MockDataGatewayPoolFactory) SetPool(ctx context.Context, pool *entity.Uniswapv3PoolCreated) error
- func (s *MockDataGatewayPoolFactory) WriteLogs() []WriteLog
- type RedisClient
- type RepositoryENS
- type RepositoryPoolFactory
- type WriteLog
Constants ¶
View Source
const EnsRedisKey = "demo:ens"
Use Redis Hash Map to store entity.ENS, with ID as field (sub-key)
View Source
const PoolFactoryRedisKey = "demo:poolfactory"
Variables ¶
This section is empty.
Functions ¶
func HandleRedisErr ¶
wraps it with superwather.ErrRecordNotFound.
Types ¶
type DebugDataGateway ¶
type DebugDataGateway interface {
WriteLogs() []WriteLog
}
type MockDataGatewayENS ¶
func (*MockDataGatewayENS) WriteLogs ¶
func (s *MockDataGatewayENS) WriteLogs() []WriteLog
type MockDataGatewayPoolFactory ¶
func (*MockDataGatewayPoolFactory) DelPool ¶
func (s *MockDataGatewayPoolFactory) DelPool( ctx context.Context, pool *entity.Uniswapv3PoolCreated, ) error
func (*MockDataGatewayPoolFactory) GetPool ¶
func (s *MockDataGatewayPoolFactory) GetPool( ctx context.Context, lpAddress common.Address, ) ( *entity.Uniswapv3PoolCreated, error, )
func (*MockDataGatewayPoolFactory) GetPools ¶
func (s *MockDataGatewayPoolFactory) GetPools(ctx context.Context) ([]*entity.Uniswapv3PoolCreated, error)
func (*MockDataGatewayPoolFactory) SetPool ¶
func (s *MockDataGatewayPoolFactory) SetPool( ctx context.Context, pool *entity.Uniswapv3PoolCreated, ) error
func (*MockDataGatewayPoolFactory) WriteLogs ¶
func (s *MockDataGatewayPoolFactory) WriteLogs() []WriteLog
type RedisClient ¶
type RepositoryENS ¶
type RepositoryENS interface { SetENS(context.Context, *entity.ENS) error GetENS(context.Context, string) (*entity.ENS, error) GetENSes(context.Context) ([]*entity.ENS, error) DelENS(context.Context, *entity.ENS) error }
func NewEnsDataGateway ¶
func NewEnsDataGateway(redisCli *redis.Client) RepositoryENS
func NewMockDataGatewayENS ¶
func NewMockDataGatewayENS() RepositoryENS
type RepositoryPoolFactory ¶
type RepositoryPoolFactory interface { SetPool(context.Context, *entity.Uniswapv3PoolCreated) error GetPool(context.Context, common.Address) (*entity.Uniswapv3PoolCreated, error) GetPools(context.Context) ([]*entity.Uniswapv3PoolCreated, error) DelPool(context.Context, *entity.Uniswapv3PoolCreated) error }
func NewDataGatewayPoolFactory ¶
func NewDataGatewayPoolFactory(redisCli *redis.Client) RepositoryPoolFactory
func NewMockDataGatewayPoolFactory ¶
func NewMockDataGatewayPoolFactory() RepositoryPoolFactory
Source Files ¶
Click to show internal directories.
Click to hide internal directories.