Documentation
¶
Index ¶
- Variables
- func NewPostgresStore(pqdriver *pgxpool.Pool, tablename string) *pgstore
- type User
- type Users
- func (us *Users) AsyncRegisters(ctx context.Context, users []User) error
- func (us *Users) Login(ctx context.Context, email, password string) (*User, error)
- func (us *Users) ReadByEmail(ctx context.Context, email string) (*User, error)
- func (us *Users) Register(ctx context.Context, user *User) (*User, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewPostgresStore ¶
Types ¶
type User ¶
type User struct {
ID string `json:"id"`
FullName string `json:"fullName"`
Email string `json:"email"`
Password []byte `json:"-"`
Phone string `json:"phone"`
ContactAddress string `json:"contactAddress"`
}
func (*User) CheckPassword ¶
func (*User) HashPassword ¶
func (*User) ValidateForCreate ¶
ValidateForCreate runs the validation required for when a user is being created. i.e. ID is not available
type Users ¶
type Users struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(store store) *Users
func (*Users) AsyncRegisters ¶
func (*Users) ReadByEmail ¶
Click to show internal directories.
Click to hide internal directories.