Documentation ¶
Index ¶
- func ContainsString(strings []string, str string) bool
- func ContainsUser(users []*User, user *User) bool
- type FamilyMembers
- type User
- type UserRepository
- type UserRepositoryDb
- func (d UserRepositoryDb) CreateUser(u User) (string, *errs.AppError)
- func (d UserRepositoryDb) FindRelationship(start string, end string) ([]*User, *errs.AppError)
- func (d UserRepositoryDb) GetAllFamilyMembers(user_id string) (*FamilyMembers, *errs.AppError)
- func (d UserRepositoryDb) GetUserByUserId(user_id string) (*User, *errs.AppError)
- func (d UserRepositoryDb) SearchUser(key string, value string) ([]*User, *errs.AppError)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsString ¶
func ContainsUser ¶
Types ¶
type FamilyMembers ¶
type FamilyMembers struct { Father *User `json:"user_father,omitempty"` Mother *User `json:"user_mother,omitempty"` Partner *User `json:"user_partner,omitempty"` Brothers []*User `json:"user_brothers,omitempty"` Sisters []*User `json:"user_sisters,omitempty"` Children []*User `json:"user_children,omitempty"` }
type User ¶
type User struct { Id primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` UserId string `bson:"user_id,omitempty" json:"user_id,omitempty"` UserName string `bson:"user_name" json:"user_name"` UserGender string `bson:"user_gender" json:"user_gender"` UserEmail string `bson:"user_email" json:"user_email"` UserPhoneNumber string `bson:"user_phone_number" json:"user_phone_number"` UserPassword string `bson:"user_password" json:"user_password"` UserMother string `bson:"user_mother" json:"user_mother"` UserFather string `bson:"user_father" json:"user_father"` UserPartner string `bson:"user_partner" json:"user_partner"` UserBrothers []string `bson:"user_brothers" json:"user_brothers"` UserSisters []string `bson:"user_sisters" json:"user_sisters"` UserChildren []string `bson:"user_children" json:"user_children"` UserLocation string `bson:"user_location" json:"user_location"` }
type UserRepository ¶
type UserRepositoryDb ¶
type UserRepositoryDb struct {
// contains filtered or unexported fields
}
func NewUserRepository ¶
func NewUserRepository(dbClient *mongo.Client) UserRepositoryDb
func (UserRepositoryDb) CreateUser ¶
func (d UserRepositoryDb) CreateUser(u User) (string, *errs.AppError)
func (UserRepositoryDb) FindRelationship ¶
func (UserRepositoryDb) GetAllFamilyMembers ¶
func (d UserRepositoryDb) GetAllFamilyMembers(user_id string) (*FamilyMembers, *errs.AppError)
func (UserRepositoryDb) GetUserByUserId ¶
func (d UserRepositoryDb) GetUserByUserId(user_id string) (*User, *errs.AppError)
func (UserRepositoryDb) SearchUser ¶
Click to show internal directories.
Click to hide internal directories.