db

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package db is a generated GoMock package.

Index

Constants

View Source
const (
	Expiration = 3 * time.Second
	RetryDelay = 100 * time.Millisecond
	Tries      = 20
)

Variables

View Source
var (
	ErrRecordNotFound = errors.New("record not found")
	ErrNotImplemented = errors.New("not implemented")
)

Functions

This section is empty.

Types

type MockPort

type MockPort struct {
	// contains filtered or unexported fields
}

MockPort is a mock of Port interface.

func NewMockPort

func NewMockPort(ctrl *gomock.Controller) *MockPort

NewMockPort creates a new mock instance.

func (*MockPort) ClearAllSymbolListenersCount

func (m *MockPort) ClearAllSymbolListenersCount(ctx context.Context) error

ClearAllSymbolListenersCount mocks base method.

func (*MockPort) ClearSymbolListenerSubscribers

func (m *MockPort) ClearSymbolListenerSubscribers(ctx context.Context, exchange, pairSymbol string) error

ClearSymbolListenerSubscribers mocks base method.

func (*MockPort) DecrementSymbolListenerSubscribers

func (m *MockPort) DecrementSymbolListenerSubscribers(ctx context.Context, exchange, pairSymbol string) (int64, error)

DecrementSymbolListenerSubscribers mocks base method.

func (*MockPort) EXPECT

func (m *MockPort) EXPECT() *MockPortMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPort) GetSymbolListenerSubscribers

func (m *MockPort) GetSymbolListenerSubscribers(ctx context.Context, exchange, pairSymbol string) (int64, error)

GetSymbolListenerSubscribers mocks base method.

func (*MockPort) IncrementSymbolListenerSubscribers

func (m *MockPort) IncrementSymbolListenerSubscribers(ctx context.Context, exchange, pairSymbol string) (int64, error)

IncrementSymbolListenerSubscribers mocks base method.

type MockPortMockRecorder

type MockPortMockRecorder struct {
	// contains filtered or unexported fields
}

MockPortMockRecorder is the mock recorder for MockPort.

func (*MockPortMockRecorder) ClearAllSymbolListenersCount

func (mr *MockPortMockRecorder) ClearAllSymbolListenersCount(ctx interface{}) *gomock.Call

ClearAllSymbolListenersCount indicates an expected call of ClearAllSymbolListenersCount.

func (*MockPortMockRecorder) ClearSymbolListenerSubscribers

func (mr *MockPortMockRecorder) ClearSymbolListenerSubscribers(ctx, exchange, pairSymbol interface{}) *gomock.Call

ClearSymbolListenerSubscribers indicates an expected call of ClearSymbolListenerSubscribers.

func (*MockPortMockRecorder) DecrementSymbolListenerSubscribers

func (mr *MockPortMockRecorder) DecrementSymbolListenerSubscribers(ctx, exchange, pairSymbol interface{}) *gomock.Call

DecrementSymbolListenerSubscribers indicates an expected call of DecrementSymbolListenerSubscribers.

func (*MockPortMockRecorder) GetSymbolListenerSubscribers

func (mr *MockPortMockRecorder) GetSymbolListenerSubscribers(ctx, exchange, pairSymbol interface{}) *gomock.Call

GetSymbolListenerSubscribers indicates an expected call of GetSymbolListenerSubscribers.

func (*MockPortMockRecorder) IncrementSymbolListenerSubscribers

func (mr *MockPortMockRecorder) IncrementSymbolListenerSubscribers(ctx, exchange, pairSymbol interface{}) *gomock.Call

IncrementSymbolListenerSubscribers indicates an expected call of IncrementSymbolListenerSubscribers.

type Port

type Port interface {
	// Symbol Listener Count
	IncrementSymbolListenerSubscribers(ctx context.Context, exchange, pairSymbol string) (int64, error)
	DecrementSymbolListenerSubscribers(ctx context.Context, exchange, pairSymbol string) (int64, error)
	GetSymbolListenerSubscribers(ctx context.Context, exchange, pairSymbol string) (int64, error)
	ClearSymbolListenerSubscribers(ctx context.Context, exchange, pairSymbol string) error
	ClearAllSymbolListenersCount(ctx context.Context) error
}

type SymbolListenerSuite

type SymbolListenerSuite struct {
	suite.Suite
	DB Port
}

func (*SymbolListenerSuite) TestIncrementDecrementSymbolListener

func (suite *SymbolListenerSuite) TestIncrementDecrementSymbolListener()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL