package
Version:
v0.0.0-...-0cd5e05
Opens a new window with list of versions in this module.
Published: Dec 15, 2023
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type CreateProductRequest struct {
Name string `validate:"required"`
Price int64 `validate:"required"`
Quantity int32 `validate:"required"`
}
type LoginRequest struct {
Email string `json:"email" validate:"required,email"`
Password string `json:"password" validate:"required"`
}
type LoginResponse struct {
Token string `json:"token"`
}
type Product struct {
Id string `json:"id" bson:"_id"`
Name string `json:"name" bson:"name"`
Price int64 `json:"price" bson:"price"`
Quantity int32 `json:"quantity" bson:"quantity"`
}
type RegisterRequest struct {
Email string `json:"email" validate:"required,email"`
Password string `json:"password" validate:"required"`
FavoritePhrase string `json:"favorite_phrase" validate:"required"`
}
type RegisterResponse struct {
Id string `json:"id"`
Email string `json:"email"`
}
type User struct {
Id string `json:"id" bson:"_id"`
Email string `json:"email" bson:"email"`
Password string `json:"password" bson:"password"`
FavoritePhrase string `json:"favorite_phrase" bson:"favorite_phrase"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.