Documentation ¶
Index ¶
- Variables
- func GetEventModelFromModelType(modelType entities.EntityModel) any
- func GetStateModelFromModelType(modelType entities.EntityModel) any
- type AuthorizationEvent
- type AuthorizationState
- type BaseModel
- type BlockStat
- type Config
- type DeleteEvent
- type EventCounter
- type EventInterface
- type MessageEvent
- type MessageState
- type MigrationState
- type SubnetEvent
- type SubnetState
- type SubscriptionEvent
- type SubscriptionState
- type TopicEvent
- type TopicState
- type WalletEvent
- type WalletState
Constants ¶
This section is empty.
Variables ¶
View Source
var Models = []interface{}{ EventCounter{}, Config{}, TopicState{}, TopicEvent{}, MessageState{}, MessageEvent{}, AuthorizationState{}, AuthorizationEvent{}, SubscriptionState{}, SubscriptionEvent{}, BlockStat{}, SubnetState{}, SubnetEvent{}, WalletState{}, WalletEvent{}, MigrationState{}, }
View Source
var SyncModels = []any{ SubnetEvent{}, SubnetState{}, AuthorizationEvent{}, AuthorizationState{}, TopicEvent{}, TopicState{}, SubscriptionEvent{}, SubscriptionState{}, MessageEvent{}, MessageState{}, EventCounter{}, }
Functions ¶
func GetEventModelFromModelType ¶ added in v1.2.16
func GetEventModelFromModelType(modelType entities.EntityModel) any
func GetStateModelFromModelType ¶ added in v1.2.16
func GetStateModelFromModelType(modelType entities.EntityModel) any
Types ¶
type AuthorizationEvent ¶
type AuthorizationEvent struct { // Event `msgpack:",noinline"` entities.Event `msgpack:",noinline"` //IsValid bool `gorm:"default:false" json:"isVal"` // EventType int16 `json:"t"` // Payload entities.ClientPayload `json:"pld" msgpack:",noinline"` BaseModel `msgpack:",noinline"` }
func (AuthorizationEvent) TableName ¶ added in v1.2.0
func (AuthorizationEvent) TableName() string
type AuthorizationState ¶
type AuthorizationState struct { entities.Authorization `msgpack:",noinline"` BaseModel }
func (*AuthorizationState) BeforeCreate ¶
func (d *AuthorizationState) BeforeCreate(tx *gorm.DB) (err error)
func (AuthorizationState) MsgPack ¶ added in v1.2.0
func (auth AuthorizationState) MsgPack() []byte
func (AuthorizationState) TableName ¶ added in v1.2.0
func (AuthorizationState) TableName() string
type DeleteEvent ¶
type EventCounter ¶ added in v1.2.0
type EventCounter struct { Id uint `json:"id" gorm:"unique;primaryKey;autoIncrement"` Count *uint64 Cycle *uint64 `gorm:"uniqueIndex:idx_uniq_cyc_sub_val;"` Subnet string `gorm:"uniqueIndex:idx_uniq_cyc_sub_val;"` Validator entities.PublicKeyString `gorm:"uniqueIndex:idx_uniq_cyc_sub_val;"` Claimed *bool `gorm:"default:false;"` }
type EventInterface ¶
type EventInterface interface { }
type MessageEvent ¶
type MessageState ¶
func (*MessageState) BeforeCreate ¶
func (d *MessageState) BeforeCreate(tx *gorm.DB) (err error)
func (MessageState) MsgPack ¶ added in v1.2.0
func (d MessageState) MsgPack() []byte
type MigrationState ¶
type SubnetEvent ¶
type SubnetState ¶
func (*SubnetState) BeforeCreate ¶
func (d *SubnetState) BeforeCreate(tx *gorm.DB) (err error)
func (SubnetState) MsgPack ¶ added in v1.2.0
func (d SubnetState) MsgPack() []byte
type SubscriptionEvent ¶
type SubscriptionState ¶
type SubscriptionState struct { BaseModel `msgpack:",noinline"` entities.Subscription `msgpack:",noinline"` }
func (*SubscriptionState) BeforeCreate ¶
func (d *SubscriptionState) BeforeCreate(tx *gorm.DB) (err error)
func (SubscriptionState) MsgPack ¶ added in v1.2.0
func (d SubscriptionState) MsgPack() []byte
type TopicEvent ¶
type TopicState ¶
func (*TopicState) BeforeCreate ¶
func (d *TopicState) BeforeCreate(tx *gorm.DB) (err error)
func (TopicState) MsgPack ¶ added in v1.2.0
func (d TopicState) MsgPack() []byte
type WalletEvent ¶
type WalletState ¶
func (*WalletState) BeforeCreate ¶
func (d *WalletState) BeforeCreate(tx *gorm.DB) (err error)
func (WalletState) MsgPack ¶ added in v1.2.0
func (d WalletState) MsgPack() []byte
Click to show internal directories.
Click to hide internal directories.