Documentation ¶
Index ¶
- func GetDBName(s interface{}) string
- type BlockDao
- type DaoManager
- type Database
- type EventDao
- func (d *EventDao) DeleteEventsBefore(unixTimestamp int64) error
- func (d *EventDao) GetEventByChallengeId(challengeId uint64) (*model.Event, error)
- func (d *EventDao) GetLatestEventByStatus(status model.EventStatus) (*model.Event, error)
- func (d *EventDao) GetUnexpiredEventsByStatus(currentHeight uint64, status model.EventStatus) ([]*model.Event, error)
- func (d *EventDao) GetUnexpiredEventsByVerifyResult(limit int, currentHeight uint64, verifyResult model.VerifyResult) ([]*model.Event, error)
- func (d *EventDao) IsEventExistsBetween(objectId, spOperatorAddress string, lowChallengeId, highChallengeId uint64) (bool, error)
- func (d *EventDao) SaveBlockAndEvents(b *model.Block, events []*model.Event) error
- func (d *EventDao) UpdateEventStatusByChallengeId(challengeId uint64, status model.EventStatus) error
- func (d *EventDao) UpdateEventStatusVerifyResultByChallengeId(challengeId uint64, status model.EventStatus, result model.VerifyResult) error
- type VoteDao
- func (d *VoteDao) DeleteVotesBefore(unixTimestamp int64) error
- func (d *VoteDao) GetVotesByEventHash(eventHash string) ([]*model.Vote, error)
- func (d *VoteDao) IsVoteExists(eventHash string, pubKey string) (bool, error)
- func (d *VoteDao) SaveVote(vote *model.Vote) error
- func (d *VoteDao) SaveVoteAndUpdateEventStatus(vote *model.Vote, challengeId uint64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DaoManager ¶
func NewDaoManager ¶
func NewDaoManager(blockDao *BlockDao, eventDao *EventDao, voteDao *VoteDao) *DaoManager
type EventDao ¶
func NewEventDao ¶
func (*EventDao) DeleteEventsBefore ¶
func (*EventDao) GetEventByChallengeId ¶
func (*EventDao) GetLatestEventByStatus ¶
func (*EventDao) GetUnexpiredEventsByStatus ¶
func (*EventDao) GetUnexpiredEventsByVerifyResult ¶
func (*EventDao) IsEventExistsBetween ¶
func (*EventDao) SaveBlockAndEvents ¶
func (*EventDao) UpdateEventStatusByChallengeId ¶
func (d *EventDao) UpdateEventStatusByChallengeId(challengeId uint64, status model.EventStatus) error
func (*EventDao) UpdateEventStatusVerifyResultByChallengeId ¶
func (d *EventDao) UpdateEventStatusVerifyResultByChallengeId(challengeId uint64, status model.EventStatus, result model.VerifyResult) error
type VoteDao ¶
func NewVoteDao ¶
func (*VoteDao) DeleteVotesBefore ¶
func (*VoteDao) GetVotesByEventHash ¶
func (*VoteDao) IsVoteExists ¶
Click to show internal directories.
Click to hide internal directories.