Documentation ¶
Index ¶
- type Service
- func (s *Service) CreateUser(ctx context.Context, user User) (*User, error)
- func (s *Service) DeleteUser(ctx context.Context, userID string) (*User, error)
- func (s *Service) GetUser(ctx context.Context, userID string) (*User, error)
- func (s *Service) GetUserByEmail(ctx context.Context, email string) (*User, error)
- func (s *Service) GetUsers(ctx context.Context, lastID string, limit int) ([]User, error)
- func (s *Service) LoginUser(ctx context.Context, email, password string) (*User, string, error)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) CreateUser ¶
func (*Service) DeleteUser ¶
func (*Service) GetUserByEmail ¶
type User ¶
type User struct { ID string `json:"id" bson:"_id,omitempty"` FirstName string `json:"firstName" bson:"firstName,omitempty"` LastName string `json:"lastName" bson:"lastName,omitempty"` Email string `json:"email" bson:"email,omitempty"` Password string `json:"-" bson:"password,omitempty"` TimeAdded time.Time `json:"timeAdded" bson:"timeAdded,omitempty"` LastUpdated time.Time `json:"-" bson:"lastUpdated,omitempty"` }
Click to show internal directories.
Click to hide internal directories.