Documentation ¶
Index ¶
- func EventExist(ePath *entities.EventPath) bool
- func GetAccountSubscriptions(account string)
- func GetConfig(key string) (*models.Config, error)
- func GetDependentEvents(event entities.Event) (*[]entities.Event, error)
- func GetEventFromPath(ePath *entities.EventPath) (*entities.Event, error)
- func GetMany[T any, U any](item T, data *U, order *map[string]Order) error
- func GetManyAuthorizationEvents(event entities.Event) (*models.AuthorizationEvent, error)
- func GetManyGroupBy[T any, U any](item T, data *U, gb string) error
- func GetManyTx[T any](item T) *gorm.DB
- func GetOne[T any, U any](filter T, data *U) error
- func GetOneAuthorizationEvent(event entities.Event) (*models.AuthorizationEvent, error)
- func GetOneAuthorizationState(auth entities.Authorization) (*models.AuthorizationState, error)
- func GetTableName(table any) string
- func GetTx() *gorm.DB
- func GetWithIN[T any, U any, I any](item T, data *U, slice I) error
- func IncrementBlockStat(blockNumber uint64, eventType *constants.EventType) (model *models.BlockStat, created bool, err error)
- func SaveAuthorizationEvent(event *entities.Event, update bool, DB *gorm.DB) (model *models.AuthorizationEvent, created bool, err error)
- func SaveAuthorizationState(auth *entities.Authorization, DB *gorm.DB) (*models.AuthorizationState, error)
- func SaveAuthorizationStateAndEvent(authEvent *entities.Event, tx *gorm.DB) (*models.AuthorizationState, *models.AuthorizationEvent, error)
- func SaveRecord[Model any](where Model, data Model, update bool, DB *gorm.DB) (model *Model, created bool, err error)
- func SaveRecordWithMap[Model any](model *Model, where map[string]interface{}, data map[string]interface{}, ...) (created bool, err error)
- func SetConfig(key string, value string) (*models.Config, error)
- func UpdateAuthorizationEvent(where entities.Event, updateFields entities.Event, DB *gorm.DB) (model *models.AuthorizationEvent, err error)
- func UpdateSubnetState(Subnet *entities.Subnet, DB *gorm.DB) (*models.SubnetState, error)
- func UpdateTopicState(topic *entities.Topic, DB *gorm.DB) (*models.TopicState, error)
- type Order
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventExist ¶
func GetAccountSubscriptions ¶
func GetAccountSubscriptions(account string)
func GetManyAuthorizationEvents ¶
func GetManyAuthorizationEvents(event entities.Event) (*models.AuthorizationEvent, error)
func GetOneAuthorizationEvent ¶
func GetOneAuthorizationEvent(event entities.Event) (*models.AuthorizationEvent, error)
func GetOneAuthorizationState ¶
func GetOneAuthorizationState(auth entities.Authorization) (*models.AuthorizationState, error)
func GetTableName ¶
func IncrementBlockStat ¶
func IncrementBlockStat(blockNumber uint64, eventType *constants.EventType) (model *models.BlockStat, created bool, err error)
EventCount uint64 `json:"ec"` MessageCount uint64 `json:"mc"` TopicCount uint64 `json:"tc"` AuthorizationCount uint64 `json:"ac"` Cycle uint64 `json:"cy"` Volume uint64 `json:"vol"`
func SaveAuthorizationEvent ¶
func SaveAuthorizationState ¶
func SaveAuthorizationState(auth *entities.Authorization, DB *gorm.DB) (*models.AuthorizationState, error)
Save authorization only when it doesnt exist
func SaveAuthorizationStateAndEvent ¶
func SaveAuthorizationStateAndEvent(authEvent *entities.Event, tx *gorm.DB) (*models.AuthorizationState, *models.AuthorizationEvent, error)
func SaveRecord ¶
func SaveRecordWithMap ¶
func UpdateSubnetState ¶
Save Subnet state only when it doesnt exist
func UpdateTopicState ¶
Save topic state only when it doesnt exist
Types ¶
type Result ¶
type Result struct { models.SubscriptionState Block uint }
func GetSubscriptionsByBlock ¶
Click to show internal directories.
Click to hide internal directories.