Documentation ¶
Index ¶
- Variables
- func EventExist(ePath *entities.EventPath) bool
- func FormatSQL(vars []interface{}) string
- func GenerateImportScript[T any](db *gorm.DB, model T, where string, fileName string, ...) ([]byte, error)
- 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 GetManyWithLimit[T any, U any](item T, data *U, order *map[string]Order, limit int, offset int) error
- 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 GetOneState[T any](filter any, data *T) error
- func GetOneWithOr[T any, U any](where T, or T, data U) error
- func GetStateFromPath(ePath *entities.EntityPath) (any, error)
- func GetSubnetById(id string) (*models.SubnetState, error)
- func GetSubscriptionStateBySubscriber(subnet string, topic string, subscribers []entities.DIDString, DB *gorm.DB) (*[]models.SubscriptionState, error)
- func GetTableName(table any) string
- func GetTopic(where models.TopicState) (*models.TopicState, error)
- func GetTopicByHash(hash string) (*models.TopicState, error)
- func GetTopicById(id string) (*models.TopicState, error)
- func GetTopicEvents() (*[]models.TopicEvent, error)
- func GetTopics(subTopic entities.Topic) (*[]models.TopicState, error)
- func GetTx() *gorm.DB
- func GetWithIN[T any, U any, I any](item T, data *U, slice I) error
- func ImportDataPostgres(cfg *configs.MainConfiguration, table string, columns []string, ...) 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, *gorm.DB)
- func SaveAuthorizationStateAndEvent(authEvent *entities.Event, tx *gorm.DB) (*models.AuthorizationState, *models.AuthorizationEvent, error)
- func SaveRecord[Model any](where Model, createData *Model, updateData *Model, 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 SaveToFile(filename, data string) 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 ExportData
- type Order
- type Result
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorNotFound = gorm.ErrRecordNotFound
Functions ¶
func EventExist ¶
func GenerateImportScript ¶ added in v1.2.0
func GetAccountSubscriptions ¶
func GetAccountSubscriptions(account string)
func GetManyAuthorizationEvents ¶
func GetManyAuthorizationEvents(event entities.Event) (*models.AuthorizationEvent, error)
func GetManyWithLimit ¶ added in v1.2.0
func GetOneAuthorizationEvent ¶
func GetOneAuthorizationEvent(event entities.Event) (*models.AuthorizationEvent, error)
func GetOneAuthorizationState ¶
func GetOneAuthorizationState(auth entities.Authorization) (*models.AuthorizationState, error)
func GetOneState ¶ added in v1.2.0
func GetOneWithOr ¶ added in v1.2.0
func GetStateFromPath ¶ added in v1.2.0
func GetStateFromPath(ePath *entities.EntityPath) (any, error)
func GetSubnetById ¶ added in v1.4.0
func GetSubnetById(id string) (*models.SubnetState, error)
func GetSubscriptionStateBySubscriber ¶ added in v1.4.0
func GetSubscriptionStateBySubscriber(subnet string, topic string, subscribers []entities.DIDString, DB *gorm.DB) (*[]models.SubscriptionState, error)
Save Subnet state only when it doesnt exist
func GetTableName ¶
func GetTopic ¶ added in v1.2.0
func GetTopic(where models.TopicState) (*models.TopicState, error)
func GetTopicByHash ¶ added in v1.2.0
func GetTopicByHash(hash string) (*models.TopicState, error)
func GetTopicById ¶ added in v1.2.0
func GetTopicById(id string) (*models.TopicState, error)
func GetTopicEvents ¶ added in v1.2.0
func GetTopicEvents() (*[]models.TopicEvent, error)
func GetTopics ¶ added in v1.2.0
func GetTopics(subTopic entities.Topic) (*[]models.TopicState, error)
func ImportDataPostgres ¶ added in v1.2.16
func SaveAuthorizationEvent ¶
func SaveAuthorizationState ¶
func SaveAuthorizationState(auth *entities.Authorization, DB *gorm.DB) (*models.AuthorizationState, *gorm.DB)
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 SaveToFile ¶ added in v1.2.0
func UpdateSubnetState ¶
Save Subnet state only when it doesnt exist
func UpdateTopicState ¶
Save topic state only when it doesnt exist
Types ¶
type ExportData ¶ added in v1.2.16
type Result ¶
type Result struct { models.SubscriptionState Block uint }
func GetSubscriptionsByBlock ¶
Click to show internal directories.
Click to hide internal directories.