Documentation ¶
Index ¶
- Variables
- type AuthCred
- type Models
- type TokenStr
- type User
- type UserModel
- func (u UserModel) Create(ctx context.Context, user *User) error
- func (u UserModel) DeleteByID(ctx context.Context, id string) error
- func (u UserModel) Get(ctx context.Context, skip, limit int64) (*[]User, error)
- func (u UserModel) GetByEmail(ctx context.Context, email string) (*User, error)
- func (u UserModel) GetByID(ctx context.Context, id string) (*User, error)
- func (u UserModel) GetByPhone(ctx context.Context, phone string) (*User, error)
- func (u UserModel) Update(ctx context.Context, id string, user *User) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Models ¶
type Models struct { User interface { Create(ctx context.Context, user *User) error GetByID(ctx context.Context, id string) (*User, error) Get(ctx context.Context, skip, limit int64) (*[]User, error) GetByEmail(ctx context.Context, email string) (*User, error) GetByPhone(ctx context.Context, phone string) (*User, error) Update(ctx context.Context, id string, user *User) error DeleteByID(ctx context.Context, id string) error } }
type User ¶
type User struct { ID string `json:"id,omitempty" bson:"_id,omitempty"` FirstName string `json:"first_name,omitempty" bson:"first_name,omitempty"` LastName string `json:"last_name,omitempty" bson:"last_name,omitempty"` DisplayName string `json:"display_name,omitempty" bson:"display_name,omitempty"` Phone string `json:"phone,omitempty" bson:"phone,omitempty"` Email string `json:"email,omitempty" bson:"email,omitempty"` EmailVerified string `json:"email_verified,omitempty" bson:"email_verified,omitempty"` Password string `json:"password,omitempty" bson:"password,omitempty"` CreatedAt time.Time `json:"created_at,omitempty" bson:"created_at,omitempty"` }
type UserModel ¶
type UserModel struct {
// contains filtered or unexported fields
}
func NewUserModel ¶
func (UserModel) GetByEmail ¶
func (UserModel) GetByPhone ¶
Click to show internal directories.
Click to hide internal directories.