package
Version:
v0.0.0-...-2a97ad4
Opens a new window with list of versions in this module.
Published: Mar 3, 2022
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Account struct {
Email string `json:"Email" validate:"email"`
Password string `json:"Password" validate:"required"`
Phone uint `json:"Phone" validate:"required"`
Token string `json:"Token"`
Role Role `json:"Role"`
Verified bool `json:"Verified"`
}
type Error struct {
FailedField string `json:"FailedField"`
Tag string `json:"Tag"`
Value string `json:"Value"`
}
type Response struct {
Status int `json:"Status"`
Message string `json:"Message"`
Data interface{} `json:"Data"`
}
var (
ADMIN Role = "admin"
USER Role = "user"
)
type User struct {
Id primitive.ObjectID `json:"Id" bson:"_id,omitempty"`
Name string `json:"Name" validate:"required"`
Account Account `json:"Account" validate:"required"`
CreatedAt time.Time `json:"CreatedAt"`
UpdatedAt time.Time `json:"UpdatedAt"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.