Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clothes ¶
type Clothes struct { ID primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"` Owner primitive.ObjectID `json:"owner,omitempty" bson:"owner,omitempty"` ImageURL string `json:"image_url,omitempty" bson:"image_url,omitempty"` Color string `json:"color,omitempty" bson:"color,omitempty"` ClothType string `json:"type,omitempty" bson:"type,omitempty"` }
Clothes represents a clothing item on the system
type ClothesStore ¶
type ClothesStore struct {
// contains filtered or unexported fields
}
ClothesStore contains all the CRUD operations for the Clothes model
func NewClothesStore ¶
func NewClothesStore(database *mongo.Database) *ClothesStore
NewClothesStore creates a new ClothesStore with a given database
func (*ClothesStore) Create ¶
func (cs *ClothesStore) Create(c Clothes, userID string) (Clothes, error)
Create stores new clothes on the database for a user id
type User ¶
type User struct { ID primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` Lastname string `json:"lastname,omitempty" bson:"lastname,omitempty"` Email string `json:"email,omitempty" bson:"email,omitempty"` Password string `json:"password,omitempty" bson:"password,omitempty"` Status string `json:"status,omitempty" bson:"status,omitempty"` }
User model represents a user on the system
type UserStore ¶
type UserStore struct {
// contains filtered or unexported fields
}
UserStore contains all the CRUD operations for the User model
func NewUserStore ¶
NewUserStore creates a user store with a mongo database
func (*UserStore) GetByEmail ¶
GetByEmail retrieves a user by a given email
func (*UserStore) ValidEmail ¶
ValidEmail hecks if an email is already taken
Click to show internal directories.
Click to hide internal directories.