1
0

test manga

This commit is contained in:
2024-04-02 18:57:04 +09:00
parent b48ec9e88c
commit 6a868436e7
40 changed files with 16522 additions and 338 deletions

View File

@ -32,6 +32,18 @@ func (f GroupFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.GroupMutation", m)
}
// The MaFunc type is an adapter to allow the use of ordinary
// function as Ma mutator.
type MaFunc func(context.Context, *ent.MaMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f MaFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.MaMutation); ok {
return f(ctx, mv)
}
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.MaMutation", m)
}
// The UeFunc type is an adapter to allow the use of ordinary
// function as Ue mutator.
type UeFunc func(context.Context, *ent.UeMutation) (ent.Value, error)