Documentation ¶
Index ¶
- type Repository
- func (r *Repository) DeleteLastBlockData() error
- func (r *Repository) GetById(id uint64) (*models.Block, error)
- func (r *Repository) GetLastFromDB() (*models.Block, error)
- func (r *Repository) LinkWithValidators(links []*models.BlockValidator) error
- func (r *Repository) Save(block *models.Block) error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *pg.DB) *Repository
func (*Repository) DeleteLastBlockData ¶
func (r *Repository) DeleteLastBlockData() error
func (*Repository) GetById ¶ added in v2.12.0
func (r *Repository) GetById(id uint64) (*models.Block, error)
func (*Repository) GetLastFromDB ¶
func (r *Repository) GetLastFromDB() (*models.Block, error)
func (*Repository) LinkWithValidators ¶
func (r *Repository) LinkWithValidators(links []*models.BlockValidator) error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewBlockService ¶
func NewBlockService(blockRepository *Repository, validatorRepository *validator.Repository, broadcastService *broadcast.Service) *Service
func (*Service) GetBlockCache ¶
func (*Service) HandleBlockResponse ¶
func (s *Service) HandleBlockResponse(response *api_pb.BlockResponse) error
Handle response and save block to DB
func (*Service) SetBlockCache ¶
Click to show internal directories.
Click to hide internal directories.