1
0
forked from ALHP/ALHP.GO

Git-based package source layout (#193)

Co-authored-by: Giovanni Harting <539@idlegandalf.com>
Reviewed-on: ALHP/ALHP.GO#193
This commit is contained in:
2023-05-21 20:28:23 +02:00
parent 786b70b842
commit fa902fa68c
25 changed files with 1541 additions and 2386 deletions

View File

@@ -9,16 +9,16 @@ import (
"somegit.dev/ALHP/ALHP.GO/ent"
)
// The DbPackageFunc type is an adapter to allow the use of ordinary
// function as DbPackage mutator.
type DbPackageFunc func(context.Context, *ent.DbPackageMutation) (ent.Value, error)
// The DBPackageFunc type is an adapter to allow the use of ordinary
// function as DBPackage mutator.
type DBPackageFunc func(context.Context, *ent.DBPackageMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f DbPackageFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.DbPackageMutation); ok {
func (f DBPackageFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.DBPackageMutation); ok {
return f(ctx, mv)
}
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.DbPackageMutation", m)
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.DBPackageMutation", m)
}
// Condition is a hook condition function.