WithUser adds the user to the context - shared implementation
(ctx context.Context, u *models.User)
| 34 | |
| 35 | // WithUser adds the user to the context - shared implementation |
| 36 | func WithUser(ctx context.Context, u *models.User) context.Context { |
| 37 | return context.WithValue(ctx, UserKey, u) |
| 38 | } |
| 39 | |
| 40 | // GetSession reads the session from the context - shared implementation |
| 41 | func GetSession(ctx context.Context) *models.Session { |
no outgoing calls