Update to new goprogram version

This commit is contained in:
Tom Wiesing 2023-11-01 22:01:24 +01:00
parent 7bd9570bc0
commit 873fdcd5c2
No known key found for this signature in database
106 changed files with 478 additions and 825 deletions

View file

@ -27,7 +27,7 @@ func (policy *Policy) Set(ctx context.Context, grant models.Grant) error {
// check that the referenced user exists!
{
_, err := policy.Dependencies.Auth.User(ctx, grant.User)
_, err := policy.dependencies.Auth.User(ctx, grant.User)
if err != nil {
return err
}

View file

@ -14,7 +14,7 @@ import (
type Policy struct {
component.Base
Dependencies struct {
dependencies struct {
SQL *sql.SQL
Auth *auth.Auth
}
@ -29,10 +29,10 @@ var (
func (pol *Policy) TableInfo() component.TableInfo {
return component.TableInfo{
Name: models.GrantTable,
Model: reflectx.MakeType[models.Grant](),
Model: reflectx.TypeFor[models.Grant](),
}
}
func (pol *Policy) table(ctx context.Context) (*gorm.DB, error) {
return pol.Dependencies.SQL.QueryTable(ctx, pol)
return pol.dependencies.SQL.QueryTable(ctx, pol)
}