Documentation ¶
Index ¶
- Constants
- func SaveFutureEndorsementRightsForBlockRange(ctx context.Context, blockFrom, blockTo, headLevel int64, unit UnitOfWork, ...) (int, error)
- func SaveFutureRightsForBlockRange(ctx context.Context, blockFrom, blockTo, headLevel int64, unit UnitOfWork, ...) (int, error)
- func SaveNewBakingRights(ctx context.Context, unit UnitOfWork, provider RightsProvider) (count int, err error)
- func SaveNewEndorsementRights(ctx context.Context, unit UnitOfWork, provider RightsProvider) (count int, err error)
- type BlocksRepo
- type RightsProvider
- type RightsRepo
- type UnitOfWork
Constants ¶
View Source
const BlocksRangeSize = 256
Variables ¶
This section is empty.
Functions ¶
func SaveFutureEndorsementRightsForBlockRange ¶
func SaveFutureEndorsementRightsForBlockRange(ctx context.Context, blockFrom, blockTo, headLevel int64, unit UnitOfWork, provider RightsProvider) (int, error)
func SaveFutureRightsForBlockRange ¶
func SaveFutureRightsForBlockRange(ctx context.Context, blockFrom, blockTo, headLevel int64, unit UnitOfWork, provider RightsProvider) (int, error)
func SaveNewBakingRights ¶
func SaveNewBakingRights(ctx context.Context, unit UnitOfWork, provider RightsProvider) (count int, err error)
func SaveNewEndorsementRights ¶
func SaveNewEndorsementRights(ctx context.Context, unit UnitOfWork, provider RightsProvider) (count int, err error)
Types ¶
type BlocksRepo ¶
type RightsProvider ¶
type RightsRepo ¶
type RightsRepo interface { List(limit, offset uint, filter models.RightFilter) (rights []models.FutureBakingRight, err error) Create(right models.FutureBakingRight) error }
type UnitOfWork ¶
type UnitOfWork interface { Start(ctx context.Context) RollbackUnlessCommitted() Commit() error GetBlock() block.Repo GetFutureBakingRight() future_baking_rights.Repo GetFutureEndorsementRight() future_endorsement_rights.Repo }
Click to show internal directories.
Click to hide internal directories.