1
0

test seven

This commit is contained in:
2024-04-11 06:11:26 +09:00
parent 1d5cb2ad9f
commit 833fbe5dbc
42 changed files with 15150 additions and 22 deletions

View File

@ -44,6 +44,18 @@ func (f MaFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.MaMutation", m)
}
// The SevFunc type is an adapter to allow the use of ordinary
// function as Sev mutator.
type SevFunc func(context.Context, *ent.SevMutation) (ent.Value, error)
// Mutate calls f(ctx, m).
func (f SevFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
if mv, ok := m.(*ent.SevMutation); ok {
return f(ctx, mv)
}
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.SevMutation", 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)