Documentation ¶
Index ¶
- type Account
- func (a *Account) AddAccountBalance(b entities.AccountBalance) error
- func (a *Account) Flush(ctx context.Context) error
- func (a *Account) GetAll() ([]entities.Account, error)
- func (a *Account) GetByID(id int64) (entities.Account, error)
- func (a *Account) ObserveAccountBalances(ctx context.Context, retries int, marketID string, partyID string, ...) (accountCh <-chan []entities.AccountBalance, ref uint64)
- func (a *Account) Obtain(ctx context.Context, acc *entities.Account) error
- func (a *Account) Query(filter entities.AccountFilter) ([]entities.Account, error)
- func (a *Account) QueryAggregatedBalances(filter entities.AccountFilter, groupBy []entities.AccountField, ...) (*[]entities.AggregatedBalance, entities.PageInfo, error)
- func (a *Account) QueryBalances(ctx context.Context, filter entities.AccountFilter, ...) ([]entities.AccountBalance, entities.PageInfo, error)
- func (a *Account) QueryBalancesV1(ctx context.Context, filter entities.AccountFilter, ...) ([]entities.AccountBalance, error)
- type AccountSource
- type AccountStore
- type Asset
- type BalanceStore
- type Block
- type Chain
- type ChainStore
- type Checkpoint
- type Config
- type Delegation
- func (d *Delegation) Add(ctx context.Context, delegation entities.Delegation) error
- func (d *Delegation) Get(ctx context.Context, partyID *string, nodeID *string, epoch *int64, ...) ([]entities.Delegation, entities.PageInfo, error)
- func (d *Delegation) GetAll(ctx context.Context) ([]entities.Delegation, error)
- func (d *Delegation) GetDelegationSubscribersCount() int32
- func (d *Delegation) Observe(ctx context.Context, retries int, partyID, nodeID string) (rewardCh <-chan []entities.Delegation, ref uint64)
- type Deposit
- type Epoch
- type EthereumKeyRotation
- type Governance
- func (g *Governance) AddProposal(ctx context.Context, p entities.Proposal) error
- func (g *Governance) AddVote(ctx context.Context, v entities.Vote) error
- func (g *Governance) GetByPartyConnection(ctx context.Context, partyID string, pagination entities.CursorPagination) ([]entities.Vote, entities.PageInfo, error)
- func (g *Governance) GetNoVotesForProposal(ctx context.Context, proposalID string) ([]entities.Vote, error)
- func (g *Governance) GetProposalByID(ctx context.Context, id string) (entities.Proposal, error)
- func (g *Governance) GetProposalByReference(ctx context.Context, ref string) (entities.Proposal, error)
- func (g *Governance) GetProposals(ctx context.Context, inState *entities.ProposalState, partyID *string, ...) ([]entities.Proposal, entities.PageInfo, error)
- func (g *Governance) GetVotes(ctx context.Context, proposalID, partyID *string, value *entities.VoteValue) ([]entities.Vote, error)
- func (g *Governance) GetVotesByParty(ctx context.Context, partyID string) ([]entities.Vote, error)
- func (g *Governance) GetYesVotesForProposal(ctx context.Context, proposalID string) ([]entities.Vote, error)
- func (g *Governance) ObservePartyVotes(ctx context.Context, retries int, partyID string) (<-chan []entities.Vote, uint64)
- func (g *Governance) ObserveProposalVotes(ctx context.Context, retries int, proposalID string) (<-chan []entities.Vote, uint64)
- func (g *Governance) ObserveProposals(ctx context.Context, retries int, partyID *string) (<-chan []entities.Proposal, uint64)
- type KeyRotations
- type Ledger
- func (l *Ledger) AddLedgerEntry(le entities.LedgerEntry) error
- func (l *Ledger) AddTransferResponse(le *vega.LedgerMovement)
- func (l *Ledger) Flush(ctx context.Context) error
- func (l *Ledger) GetSubscribersCount() int32
- func (l *Ledger) Observe(ctx context.Context, retries int) (<-chan []*vega.LedgerMovement, uint64)
- type LiquidityProvision
- type MarginLevelsStore
- type MarketData
- func (m *MarketData) Add(data *entities.MarketData) error
- func (m *MarketData) Flush(ctx context.Context) error
- func (m *MarketData) GetBetweenDatesByID(ctx context.Context, marketID string, start, end time.Time, ...) ([]entities.MarketData, entities.PageInfo, error)
- func (m *MarketData) GetFromDateByID(ctx context.Context, marketID string, start time.Time, ...) ([]entities.MarketData, entities.PageInfo, error)
- func (m *MarketData) GetMarketDataByID(ctx context.Context, marketID string) (entities.MarketData, error)
- func (m *MarketData) GetMarketsData(ctx context.Context) ([]entities.MarketData, error)
- func (m *MarketData) GetToDateByID(ctx context.Context, marketID string, end time.Time, ...) ([]entities.MarketData, entities.PageInfo, error)
- func (m *MarketData) Initialise(ctx context.Context) error
- func (m *MarketData) ObserveMarketData(ctx context.Context, retries int, marketID []string) (<-chan []*entities.MarketData, uint64)
- type MarketDataStore
- type MarketDepth
- func (m *MarketDepth) AddOrder(order *types.Order, vegaTime time.Time, sequenceNumber uint64)
- func (m *MarketDepth) GetAllOrders(market string) map[string]*types.Order
- func (m *MarketDepth) GetBestAskPrice(market string) *num.Uint
- func (m *MarketDepth) GetBestBidPrice(market string) *num.Uint
- func (m *MarketDepth) GetBuyPriceLevels(market string) int
- func (m *MarketDepth) GetMarketDepth(market string, limit uint64) *types.MarketDepth
- func (m *MarketDepth) GetOrderCount(market string) int64
- func (m *MarketDepth) GetOrderCountAtPrice(market string, side types.Side, price uint64) uint64
- func (m *MarketDepth) GetPriceLevels(market string) int
- func (m *MarketDepth) GetSellPriceLevels(market string) int
- func (m *MarketDepth) GetTotalVolume(market string) int64
- func (m *MarketDepth) GetVolumeAtPrice(market string, side types.Side, price uint64) uint64
- func (m *MarketDepth) Initialise(ctx context.Context) error
- func (m *MarketDepth) ObserveDepth(ctx context.Context, retries int, marketIds []string) (<-chan []*types.MarketDepth, uint64)
- func (m *MarketDepth) ObserveDepthUpdates(ctx context.Context, retries int, marketIds []string) (<-chan []*types.MarketDepthUpdate, uint64)
- type MarketStore
- type Markets
- func (m *Markets) GetAll(ctx context.Context, pagination entities.OffsetPagination) ([]entities.Market, error)
- func (m *Markets) GetAllPaged(ctx context.Context, marketID string, pagination entities.CursorPagination) ([]entities.Market, entities.PageInfo, error)
- func (m *Markets) GetByID(ctx context.Context, marketID string) (entities.Market, error)
- func (m *Markets) Initialise(ctx context.Context) error
- func (m *Markets) Upsert(ctx context.Context, market *entities.Market) error
- type MultiSig
- type NetworkLimits
- type NetworkParameter
- type Node
- type Notary
- type OracleData
- type OracleSpec
- type Order
- func (o *Order) Add(order entities.Order) error
- func (o *Order) Flush(ctx context.Context) error
- func (o *Order) GetAll(ctx context.Context) ([]entities.Order, error)
- func (o *Order) GetAllVersionsByOrderID(ctx context.Context, id string, p entities.OffsetPagination) ([]entities.Order, error)
- func (o *Order) GetByMarket(ctx context.Context, marketID string, p entities.OffsetPagination) ([]entities.Order, error)
- func (o *Order) GetByParty(ctx context.Context, partyID string, p entities.OffsetPagination) ([]entities.Order, error)
- func (o *Order) GetByReference(ctx context.Context, reference string, p entities.OffsetPagination) ([]entities.Order, error)
- func (o *Order) GetLiveOrders(ctx context.Context) ([]entities.Order, error)
- func (o *Order) GetOrder(ctx context.Context, orderID string, version *int32) (entities.Order, error)
- func (o *Order) ListOrderVersions(ctx context.Context, orderID string, p entities.CursorPagination) ([]entities.Order, entities.PageInfo, error)
- func (o *Order) ListOrders(ctx context.Context, party *string, market *string, reference *string, ...) ([]entities.Order, entities.PageInfo, error)
- func (o *Order) ObserveOrders(ctx context.Context, retries int, market *string, party *string) (<-chan []entities.Order, uint64)
- type OrderStore
- type Party
- type Position
- func (p *Position) Add(ctx context.Context, pos entities.Position) error
- func (p *Position) Flush(ctx context.Context) error
- func (p *Position) GetAll(ctx context.Context) ([]entities.Position, error)
- func (p *Position) GetByMarket(ctx context.Context, marketID string) ([]entities.Position, error)
- func (p *Position) GetByMarketAndParty(ctx context.Context, marketID string, partyID string) (entities.Position, error)
- func (p *Position) GetByParty(ctx context.Context, partyID entities.PartyID) ([]entities.Position, error)
- func (p *Position) GetByPartyConnection(ctx context.Context, partyID entities.PartyID, marketID entities.MarketID, ...) ([]entities.Position, entities.PageInfo, error)
- func (p *Position) Observe(ctx context.Context, retries int, partyID, marketID string) (<-chan []entities.Position, uint64)
- type PositionStore
- type ProposalStore
- type Reward
- func (r *Reward) Add(ctx context.Context, reward entities.Reward) error
- func (r *Reward) GetAll(ctx context.Context) ([]entities.Reward, error)
- func (r *Reward) GetByCursor(ctx context.Context, partyID, assetID *string, p entities.CursorPagination) ([]entities.Reward, entities.PageInfo, error)
- func (r *Reward) GetByOffset(ctx context.Context, partyID *string, assetID *string, ...) ([]entities.Reward, error)
- func (r *Reward) GetRewardSubscribersCount() int32
- func (r *Reward) GetSummaries(ctx context.Context, partyID *string, assetID *string) ([]entities.RewardSummary, error)
- func (r *Reward) Observe(ctx context.Context, retries int, assetID, partyID string) (rewardCh <-chan []entities.Reward, ref uint64)
- type Risk
- func (r *Risk) Add(marginLevel entities.MarginLevels) error
- func (r *Risk) Flush(ctx context.Context) error
- func (r *Risk) GetMarginLevelsByID(ctx context.Context, partyID, marketID string, ...) ([]entities.MarginLevels, error)
- func (r *Risk) GetMarginLevelsByIDWithCursorPagination(ctx context.Context, partyID, marketID string, ...) ([]entities.MarginLevels, entities.PageInfo, error)
- func (r *Risk) ObserveMarginLevels(ctx context.Context, retries int, partyID, marketID string) (accountCh <-chan []entities.MarginLevels, ref uint64)
- type RiskFactor
- type StakeLinking
- type Trade
- func (t *Trade) Add(trade *entities.Trade) error
- func (t *Trade) Flush(ctx context.Context) error
- func (t *Trade) GetByMarket(ctx context.Context, market string, p entities.OffsetPagination) ([]entities.Trade, error)
- func (t *Trade) GetByOrderID(ctx context.Context, order string, market *string, ...) ([]entities.Trade, error)
- func (t *Trade) GetByParty(ctx context.Context, party string, market *string, ...) ([]entities.Trade, error)
- func (t *Trade) List(ctx context.Context, marketID entities.MarketID, partyID entities.PartyID, ...) ([]entities.Trade, entities.PageInfo, error)
- func (t *Trade) Observe(ctx context.Context, retries int, marketID *string, partyID *string) (<-chan []*entities.Trade, uint64)
- type Transfer
- type VoteStore
- type Withdrawal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
func NewAccount ¶
func NewAccount(aStore AccountStore, bStore BalanceStore, log *logging.Logger) *Account
func (*Account) AddAccountBalance ¶
func (a *Account) AddAccountBalance(b entities.AccountBalance) error
func (*Account) ObserveAccountBalances ¶
func (*Account) QueryAggregatedBalances ¶
func (a *Account) QueryAggregatedBalances(filter entities.AccountFilter, groupBy []entities.AccountField, dateRange entities.DateRange, pagination entities.CursorPagination) (*[]entities.AggregatedBalance, entities.PageInfo, error)
func (*Account) QueryBalances ¶
func (a *Account) QueryBalances(ctx context.Context, filter entities.AccountFilter, pagination entities.CursorPagination) ([]entities.AccountBalance, entities.PageInfo, error)
func (*Account) QueryBalancesV1 ¶
func (a *Account) QueryBalancesV1(ctx context.Context, filter entities.AccountFilter, pagination entities.OffsetPagination) ([]entities.AccountBalance, error)
type AccountStore ¶
type AccountStore interface { GetByID(id int64) (entities.Account, error) GetAll() ([]entities.Account, error) Obtain(ctx context.Context, a *entities.Account) error Query(filter entities.AccountFilter) ([]entities.Account, error) QueryBalancesV1(ctx context.Context, filter entities.AccountFilter, pagination entities.OffsetPagination) ([]entities.AccountBalance, error) QueryBalances(ctx context.Context, filter entities.AccountFilter, pagination entities.CursorPagination) ([]entities.AccountBalance, entities.PageInfo, error) }
type BalanceStore ¶
type BalanceStore interface { Flush(ctx context.Context) ([]entities.AccountBalance, error) Add(b entities.AccountBalance) error Query(filter entities.AccountFilter, groupBy []entities.AccountField, dateRange entities.DateRange, pagination entities.CursorPagination) (*[]entities.AggregatedBalance, entities.PageInfo, error) }
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
func (*Chain) GetChainID ¶
GetChainID returns the current chain ID stored in the database (if one is set).
If one is not set, return empty string and no error. If an error occurs, return empty string and an that error. It caches the result of calling to the store, so that once we have successfully retrieved a chain ID, we don't ask again.
func (*Chain) SetChainID ¶
type ChainStore ¶
type Checkpoint ¶
type Checkpoint struct{ *sqlstore.Checkpoints }
func NewCheckpoint ¶
func NewCheckpoint(store *sqlstore.Checkpoints, log *logging.Logger) *Checkpoint
type Config ¶
Config represent the configuration of the candle package.
func NewDefaultConfig ¶
func NewDefaultConfig() Config
NewDefaultConfig creates an instance of the package specific configuration, given a pointer to a logger instance to be used for logging within the package.
type Delegation ¶
type Delegation struct {
// contains filtered or unexported fields
}
func NewDelegation ¶
func NewDelegation(store delegationStore, log *logging.Logger) *Delegation
func (*Delegation) Add ¶
func (d *Delegation) Add(ctx context.Context, delegation entities.Delegation) error
func (*Delegation) Get ¶
func (d *Delegation) Get(ctx context.Context, partyID *string, nodeID *string, epoch *int64, p entities.Pagination) ([]entities.Delegation, entities.PageInfo, error)
func (*Delegation) GetAll ¶
func (d *Delegation) GetAll(ctx context.Context) ([]entities.Delegation, error)
func (*Delegation) GetDelegationSubscribersCount ¶
func (d *Delegation) GetDelegationSubscribersCount() int32
func (*Delegation) Observe ¶
func (d *Delegation) Observe(ctx context.Context, retries int, partyID, nodeID string) (rewardCh <-chan []entities.Delegation, ref uint64)
type EthereumKeyRotation ¶
type EthereumKeyRotation struct {
// contains filtered or unexported fields
}
func NewEthereumKeyRotation ¶
func NewEthereumKeyRotation(service ethereumKeyRotationsService, log *logging.Logger) *EthereumKeyRotation
func (*EthereumKeyRotation) Add ¶
func (e *EthereumKeyRotation) Add(ctx context.Context, kr entities.EthereumKeyRotation) error
func (*EthereumKeyRotation) List ¶
func (e *EthereumKeyRotation) List(ctx context.Context, nodeID entities.NodeID, pagination entities.CursorPagination, ) ([]entities.EthereumKeyRotation, entities.PageInfo, error)
type Governance ¶
type Governance struct {
// contains filtered or unexported fields
}
func NewGovernance ¶
func NewGovernance(pStore ProposalStore, vStore VoteStore, log *logging.Logger) *Governance
func (*Governance) AddProposal ¶
func (*Governance) GetByPartyConnection ¶
func (*Governance) GetNoVotesForProposal ¶
func (*Governance) GetProposalByID ¶
func (*Governance) GetProposalByReference ¶
func (*Governance) GetProposals ¶
func (g *Governance) GetProposals(ctx context.Context, inState *entities.ProposalState, partyID *string, proposalType *entities.ProposalType, pagination entities.CursorPagination, ) ([]entities.Proposal, entities.PageInfo, error)
func (*Governance) GetVotesByParty ¶
func (*Governance) GetYesVotesForProposal ¶
func (*Governance) ObservePartyVotes ¶
func (*Governance) ObserveProposalVotes ¶
func (*Governance) ObserveProposals ¶
type KeyRotations ¶
type KeyRotations struct{ *sqlstore.KeyRotations }
func NewKeyRotations ¶
func NewKeyRotations(store *sqlstore.KeyRotations, log *logging.Logger) *KeyRotations
type Ledger ¶
type Ledger struct {
// contains filtered or unexported fields
}
func (*Ledger) AddLedgerEntry ¶
func (l *Ledger) AddLedgerEntry(le entities.LedgerEntry) error
func (*Ledger) AddTransferResponse ¶
func (l *Ledger) AddTransferResponse(le *vega.LedgerMovement)
func (*Ledger) GetSubscribersCount ¶
type LiquidityProvision ¶
type LiquidityProvision struct{ *sqlstore.LiquidityProvision }
func NewLiquidityProvision ¶
func NewLiquidityProvision(store *sqlstore.LiquidityProvision, log *logging.Logger) *LiquidityProvision
type MarginLevelsStore ¶
type MarginLevelsStore interface { Add(marginLevel entities.MarginLevels) error Flush(ctx context.Context) ([]entities.MarginLevels, error) GetMarginLevelsByID(ctx context.Context, partyID, marketID string, pagination entities.OffsetPagination) ([]entities.MarginLevels, error) GetMarginLevelsByIDWithCursorPagination(ctx context.Context, partyID, marketID string, pagination entities.CursorPagination) ([]entities.MarginLevels, entities.PageInfo, error) }
type MarketData ¶
type MarketData struct {
// contains filtered or unexported fields
}
func NewMarketData ¶
func NewMarketData(store MarketDataStore, log *logging.Logger) *MarketData
func (*MarketData) Add ¶
func (m *MarketData) Add(data *entities.MarketData) error
func (*MarketData) GetBetweenDatesByID ¶
func (m *MarketData) GetBetweenDatesByID(ctx context.Context, marketID string, start, end time.Time, pagination entities.Pagination) ([]entities.MarketData, entities.PageInfo, error)
func (*MarketData) GetFromDateByID ¶
func (m *MarketData) GetFromDateByID(ctx context.Context, marketID string, start time.Time, pagination entities.Pagination) ([]entities.MarketData, entities.PageInfo, error)
func (*MarketData) GetMarketDataByID ¶
func (m *MarketData) GetMarketDataByID(ctx context.Context, marketID string) (entities.MarketData, error)
func (*MarketData) GetMarketsData ¶
func (m *MarketData) GetMarketsData(ctx context.Context) ([]entities.MarketData, error)
func (*MarketData) GetToDateByID ¶
func (m *MarketData) GetToDateByID(ctx context.Context, marketID string, end time.Time, pagination entities.Pagination) ([]entities.MarketData, entities.PageInfo, error)
func (*MarketData) Initialise ¶
func (m *MarketData) Initialise(ctx context.Context) error
func (*MarketData) ObserveMarketData ¶
func (m *MarketData) ObserveMarketData( ctx context.Context, retries int, marketID []string, ) (<-chan []*entities.MarketData, uint64)
type MarketDataStore ¶
type MarketDataStore interface { Add(data *entities.MarketData) error Flush(ctx context.Context) ([]*entities.MarketData, error) GetMarketDataByID(ctx context.Context, marketID string) (entities.MarketData, error) GetMarketsData(ctx context.Context) ([]entities.MarketData, error) GetBetweenDatesByID(ctx context.Context, marketID string, start, end time.Time, pagination entities.Pagination) ([]entities.MarketData, entities.PageInfo, error) GetFromDateByID(ctx context.Context, marketID string, start time.Time, pagination entities.Pagination) ([]entities.MarketData, entities.PageInfo, error) GetToDateByID(ctx context.Context, marketID string, end time.Time, pagination entities.Pagination) ([]entities.MarketData, entities.PageInfo, error) }
type MarketDepth ¶
type MarketDepth struct {
// contains filtered or unexported fields
}
func NewMarketDepth ¶
func NewMarketDepth(orderStore OrderStore, logger *logging.Logger) *MarketDepth
func (*MarketDepth) GetAllOrders ¶
func (m *MarketDepth) GetAllOrders(market string) map[string]*types.Order
func (*MarketDepth) GetBestAskPrice ¶
func (m *MarketDepth) GetBestAskPrice(market string) *num.Uint
GetBestAskPrice returns the highest bid price in the book.
func (*MarketDepth) GetBestBidPrice ¶
func (m *MarketDepth) GetBestBidPrice(market string) *num.Uint
GetBestBidPrice returns the highest bid price in the book.
func (*MarketDepth) GetBuyPriceLevels ¶
func (m *MarketDepth) GetBuyPriceLevels(market string) int
GetBuyPriceLevels returns the number of non empty buy price levels.
func (*MarketDepth) GetMarketDepth ¶
func (m *MarketDepth) GetMarketDepth(market string, limit uint64) *types.MarketDepth
GetMarketDepth builds up the structure to be sent out to any market depth listeners.
func (*MarketDepth) GetOrderCount ¶
func (m *MarketDepth) GetOrderCount(market string) int64
GetOrderCount returns the number of live orders for the given market.
func (*MarketDepth) GetOrderCountAtPrice ¶
GetOrderCountAtPrice returns the number of orders at the given price level.
func (*MarketDepth) GetPriceLevels ¶
func (m *MarketDepth) GetPriceLevels(market string) int
GetPriceLevels returns the number of non empty price levels.
func (*MarketDepth) GetSellPriceLevels ¶
func (m *MarketDepth) GetSellPriceLevels(market string) int
GetSellPriceLevels returns the number of non empty sell price levels.
func (*MarketDepth) GetTotalVolume ¶
func (m *MarketDepth) GetTotalVolume(market string) int64
GetTotalVolume returns the total volume in the order book.
func (*MarketDepth) GetVolumeAtPrice ¶
GetVolumeAtPrice returns the order volume at the given price level.
func (*MarketDepth) Initialise ¶
func (m *MarketDepth) Initialise(ctx context.Context) error
func (*MarketDepth) ObserveDepth ¶
func (m *MarketDepth) ObserveDepth(ctx context.Context, retries int, marketIds []string) (<-chan []*types.MarketDepth, uint64)
func (*MarketDepth) ObserveDepthUpdates ¶
func (m *MarketDepth) ObserveDepthUpdates(ctx context.Context, retries int, marketIds []string) (<-chan []*types.MarketDepthUpdate, uint64)
type MarketStore ¶
type MarketStore interface { Upsert(ctx context.Context, market *entities.Market) error GetByID(ctx context.Context, marketID string) (entities.Market, error) GetAll(ctx context.Context, pagination entities.OffsetPagination) ([]entities.Market, error) GetAllPaged(ctx context.Context, marketID string, pagination entities.CursorPagination) ([]entities.Market, entities.PageInfo, error) }
type Markets ¶
type Markets struct {
// contains filtered or unexported fields
}
func NewMarkets ¶
func NewMarkets(store MarketStore, log *logging.Logger) *Markets
func (*Markets) GetAllPaged ¶
type MultiSig ¶
type MultiSig struct {
*sqlstore.ERC20MultiSigSignerEvent
}
func NewMultiSig ¶
func NewMultiSig(store *sqlstore.ERC20MultiSigSignerEvent, log *logging.Logger) *MultiSig
type NetworkLimits ¶
type NetworkLimits struct{ *sqlstore.NetworkLimits }
func NewNetworkLimits ¶
func NewNetworkLimits(store *sqlstore.NetworkLimits, log *logging.Logger) *NetworkLimits
type NetworkParameter ¶
type NetworkParameter struct{ *sqlstore.NetworkParameters }
func NewNetworkParameter ¶
func NewNetworkParameter(store *sqlstore.NetworkParameters, log *logging.Logger) *NetworkParameter
type OracleData ¶
type OracleData struct{ *sqlstore.OracleData }
func NewOracleData ¶
func NewOracleData(store *sqlstore.OracleData, log *logging.Logger) *OracleData
type OracleSpec ¶
type OracleSpec struct{ *sqlstore.OracleSpec }
func NewOracleSpec ¶
func NewOracleSpec(store *sqlstore.OracleSpec, log *logging.Logger) *OracleSpec
type Order ¶
type Order struct {
// contains filtered or unexported fields
}
func (*Order) GetAllVersionsByOrderID ¶
func (*Order) GetByMarket ¶
func (*Order) GetByParty ¶
func (*Order) GetByReference ¶
func (*Order) GetLiveOrders ¶
func (*Order) ListOrderVersions ¶
func (*Order) ListOrders ¶
type OrderStore ¶
type Position ¶
type Position struct {
// contains filtered or unexported fields
}
func NewPosition ¶
func NewPosition(store PositionStore, log *logging.Logger) *Position
func (*Position) GetByMarket ¶
func (*Position) GetByMarketAndParty ¶
func (*Position) GetByParty ¶
func (*Position) GetByPartyConnection ¶
type PositionStore ¶
type PositionStore interface { Flush(ctx context.Context) ([]entities.Position, error) Add(ctx context.Context, p entities.Position) error GetByMarketAndParty(ctx context.Context, marketID string, partyID string) (entities.Position, error) GetByMarket(ctx context.Context, marketID string) ([]entities.Position, error) GetByParty(ctx context.Context, partyID string) ([]entities.Position, error) GetByPartyConnection(ctx context.Context, partyID string, marketID string, pagination entities.CursorPagination) ([]entities.Position, entities.PageInfo, error) GetAll(ctx context.Context) ([]entities.Position, error) }
type ProposalStore ¶
type ProposalStore interface { Add(ctx context.Context, p entities.Proposal) error GetByID(ctx context.Context, id string) (entities.Proposal, error) GetByReference(ctx context.Context, ref string) (entities.Proposal, error) Get(ctx context.Context, inState *entities.ProposalState, partyIDStr *string, proposalType *entities.ProposalType, pagination entities.CursorPagination) ([]entities.Proposal, entities.PageInfo, error) }
type Reward ¶
type Reward struct {
// contains filtered or unexported fields
}
func (*Reward) GetByCursor ¶
func (*Reward) GetByOffset ¶
func (*Reward) GetRewardSubscribersCount ¶
func (*Reward) GetSummaries ¶
type Risk ¶
type Risk struct {
// contains filtered or unexported fields
}
func NewRisk ¶
func NewRisk(mlStore MarginLevelsStore, accountSource AccountSource, log *logging.Logger) *Risk
func (*Risk) GetMarginLevelsByID ¶
func (r *Risk) GetMarginLevelsByID(ctx context.Context, partyID, marketID string, pagination entities.OffsetPagination) ([]entities.MarginLevels, error)
func (*Risk) GetMarginLevelsByIDWithCursorPagination ¶
func (*Risk) ObserveMarginLevels ¶
type RiskFactor ¶
type RiskFactor struct{ *sqlstore.RiskFactors }
func NewRiskFactor ¶
func NewRiskFactor(store *sqlstore.RiskFactors, log *logging.Logger) *RiskFactor
type StakeLinking ¶
type StakeLinking struct{ *sqlstore.StakeLinking }
func NewStakeLinking ¶
func NewStakeLinking(store *sqlstore.StakeLinking, log *logging.Logger) *StakeLinking
type Trade ¶
type Trade struct {
// contains filtered or unexported fields
}
func (*Trade) GetByMarket ¶
func (*Trade) GetByOrderID ¶
func (*Trade) GetByParty ¶
type VoteStore ¶
type VoteStore interface { Add(ctx context.Context, v entities.Vote) error GetYesVotesForProposal(ctx context.Context, proposalIDStr string) ([]entities.Vote, error) GetNoVotesForProposal(ctx context.Context, proposalIDStr string) ([]entities.Vote, error) GetByParty(ctx context.Context, partyIDStr string) ([]entities.Vote, error) GetByPartyConnection(ctx context.Context, partyIDStr string, pagination entities.CursorPagination) ([]entities.Vote, entities.PageInfo, error) Get(ctx context.Context, proposalID, partyID *string, value *entities.VoteValue) ([]entities.Vote, error) }
type Withdrawal ¶
type Withdrawal struct{ *sqlstore.Withdrawals }
func NewWithdrawal ¶
func NewWithdrawal(store *sqlstore.Withdrawals, log *logging.Logger) *Withdrawal