Migrating roles and schemes to new Cache Layer (#11936)

* Migrating roles and schemes to new Cache Layer

* Adding missed license headers

* Updating cache tests

* Adding the cache layer to the testlib helper

* Fixing cyclic dependency

* fixing a bit of not-idiomatic error handling

* Another small fix arrount idiomatic error handling
Этот коммит содержится в:
Jesús Espino
2019-09-12 18:52:45 +02:00
коммит произвёл GitHub
родитель e58aeb90a8
Коммит 28cc7e7e36
18 изменённых файлов: 410 добавлений и 510 удалений

Просмотреть файл

@@ -152,11 +152,10 @@ func NewSqlSupplier(settings model.SqlSettings, metrics einterfaces.MetricsInter
supplier.oldStores.UserTermsOfService = NewSqlUserTermsOfServiceStore(supplier)
supplier.oldStores.linkMetadata = NewSqlLinkMetadataStore(supplier)
supplier.oldStores.reaction = NewSqlReactionStore(supplier)
supplier.oldStores.role = NewSqlRoleStore(supplier)
supplier.oldStores.scheme = NewSqlSchemeStore(supplier)
supplier.oldStores.group = NewSqlGroupStore(supplier)
initSqlSupplierRoles(supplier)
initSqlSupplierSchemes(supplier)
err := supplier.GetMaster().CreateTablesIfNotExists()
if err != nil {
mlog.Critical("Error creating database tables.", mlog.Err(err))