(ctx context.Context, q *ent.UserQuery)
| 594 | } |
| 595 | |
| 596 | func withUserEagerLoading(ctx context.Context, q *ent.UserQuery) *ent.UserQuery { |
| 597 | if v, ok := ctx.Value(LoadUserGroup{}).(bool); ok && v { |
| 598 | q.WithGroup(func(gq *ent.GroupQuery) { |
| 599 | withGroupEagerLoading(ctx, gq) |
| 600 | }) |
| 601 | } |
| 602 | if v, ok := ctx.Value(LoadUserPasskey{}).(bool); ok && v { |
| 603 | q.WithPasskey() |
| 604 | } |
| 605 | return q |
| 606 | } |
| 607 | |
| 608 | func digestPassword(password string) (string, error) { |
| 609 | //生成16位 Salt |
no test coverage detected