Add missing gRPC functions
This commit is contained in:
28
storage/accounts.go
Normal file
28
storage/accounts.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package storage
|
||||
|
||||
type Account struct {
|
||||
ID string `json:"id" bson:"_id"`
|
||||
Namespace string `json:"namespace"`
|
||||
Authentication AccountAuth `json:"-" bson:"authentication"`
|
||||
Data map[string]any `json:"data"`
|
||||
Metadata map[string]any `json:"metadata"`
|
||||
}
|
||||
|
||||
type AccountAuth struct {
|
||||
Local LocalAuth
|
||||
//TODO handle SSO
|
||||
}
|
||||
|
||||
type LocalAuth struct {
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
Email string `json:"email"`
|
||||
EmailValidation Validation `json:"email_validation" bson:"email_validation"`
|
||||
PhoneNumber string `json:"phone_number" bson:"phone_number"`
|
||||
PhoneNumberValidation Validation `json:"phone_number_validation" bson:"phone_number_validation"`
|
||||
}
|
||||
|
||||
type Validation struct {
|
||||
Validated bool
|
||||
ValidationCode string `json:"validation_code" bson:"validation_code"`
|
||||
}
|
||||
Reference in New Issue
Block a user