Total Lines | 15 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package entities |
||
2 | |||
3 | import "github.com/google/uuid" |
||
4 | |||
5 | // AuthContext is the user gotten from an auth request |
||
6 | type AuthContext struct { |
||
7 | ID UserID `json:"id"` |
||
8 | PhoneAPIKeyID *uuid.UUID `json:"phone_api_key_id"` |
||
9 | PhoneNumbers []string `json:"phone_numbers"` |
||
10 | Email string `json:"email"` |
||
11 | } |
||
12 | |||
13 | // IsNoop checks if a user is empty |
||
14 | func (user AuthContext) IsNoop() bool { |
||
15 | return user.ID == "" || user.Email == "" |
||
16 | } |
||
17 |