Documentation ¶
Index ¶
- Variables
- type Repository
- func (r *Repository) BeginNodeSaleTx(ctx context.Context) (datagateway.NodeSaleDataGatewayWithTx, error)
- func (repo *Repository) ClearDelegate(ctx context.Context) (int64, error)
- func (r *Repository) Commit(ctx context.Context) error
- func (repo *Repository) CreateBlock(ctx context.Context, arg entity.Block) error
- func (repo *Repository) CreateEvent(ctx context.Context, arg entity.NodeSaleEvent) error
- func (repo *Repository) CreateNode(ctx context.Context, arg entity.Node) error
- func (repo *Repository) CreateNodeSale(ctx context.Context, arg entity.NodeSale) error
- func (repo *Repository) GetBlock(ctx context.Context, blockHeight int64) (*entity.Block, error)
- func (repo *Repository) GetEventsByWallet(ctx context.Context, walletAddress string) ([]entity.NodeSaleEvent, error)
- func (repo *Repository) GetLastProcessedBlock(ctx context.Context) (*entity.Block, error)
- func (repo *Repository) GetNodeCountByTierIndex(ctx context.Context, arg datagateway.GetNodeCountByTierIndexParams) ([]datagateway.GetNodeCountByTierIndexRow, error)
- func (repo *Repository) GetNodeSale(ctx context.Context, arg datagateway.GetNodeSaleParams) ([]entity.NodeSale, error)
- func (repo *Repository) GetNodesByDeployment(ctx context.Context, saleBlock int64, saleTxIndex int32) ([]entity.Node, error)
- func (repo *Repository) GetNodesByIds(ctx context.Context, arg datagateway.GetNodesByIdsParams) ([]entity.Node, error)
- func (repo *Repository) GetNodesByOwner(ctx context.Context, arg datagateway.GetNodesByOwnerParams) ([]entity.Node, error)
- func (repo *Repository) GetNodesByPubkey(ctx context.Context, arg datagateway.GetNodesByPubkeyParams) ([]entity.Node, error)
- func (repo *Repository) RemoveBlockFrom(ctx context.Context, fromBlock int64) (int64, error)
- func (repo *Repository) RemoveEventsFromBlock(ctx context.Context, fromBlock int64) (int64, error)
- func (r *Repository) Rollback(ctx context.Context) error
- func (repo *Repository) SetDelegates(ctx context.Context, arg datagateway.SetDelegatesParams) (int64, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTxAlreadyExists = errors.New("Transaction already exists. Call Commit() or Rollback() first.")
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db postgres.DB) *Repository
func (*Repository) BeginNodeSaleTx ¶
func (r *Repository) BeginNodeSaleTx(ctx context.Context) (datagateway.NodeSaleDataGatewayWithTx, error)
func (*Repository) ClearDelegate ¶
func (repo *Repository) ClearDelegate(ctx context.Context) (int64, error)
func (*Repository) CreateBlock ¶
func (*Repository) CreateEvent ¶
func (repo *Repository) CreateEvent(ctx context.Context, arg entity.NodeSaleEvent) error
func (*Repository) CreateNode ¶
func (*Repository) CreateNodeSale ¶
func (*Repository) GetEventsByWallet ¶
func (repo *Repository) GetEventsByWallet(ctx context.Context, walletAddress string) ([]entity.NodeSaleEvent, error)
func (*Repository) GetLastProcessedBlock ¶
func (*Repository) GetNodeCountByTierIndex ¶
func (repo *Repository) GetNodeCountByTierIndex(ctx context.Context, arg datagateway.GetNodeCountByTierIndexParams) ([]datagateway.GetNodeCountByTierIndexRow, error)
func (*Repository) GetNodeSale ¶
func (repo *Repository) GetNodeSale(ctx context.Context, arg datagateway.GetNodeSaleParams) ([]entity.NodeSale, error)
func (*Repository) GetNodesByDeployment ¶
func (*Repository) GetNodesByIds ¶
func (repo *Repository) GetNodesByIds(ctx context.Context, arg datagateway.GetNodesByIdsParams) ([]entity.Node, error)
func (*Repository) GetNodesByOwner ¶
func (repo *Repository) GetNodesByOwner(ctx context.Context, arg datagateway.GetNodesByOwnerParams) ([]entity.Node, error)
func (*Repository) GetNodesByPubkey ¶
func (repo *Repository) GetNodesByPubkey(ctx context.Context, arg datagateway.GetNodesByPubkeyParams) ([]entity.Node, error)
func (*Repository) RemoveBlockFrom ¶
func (*Repository) RemoveEventsFromBlock ¶
func (*Repository) SetDelegates ¶
func (repo *Repository) SetDelegates(ctx context.Context, arg datagateway.SetDelegatesParams) (int64, error)
Click to show internal directories.
Click to hide internal directories.