Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserDBValue ¶
type UserDBValue struct { ID string `bson:"_id"` // Account information Username string `bson:"username"` Password string `bson:"password"` Email string `bson:"email"` // Timestamps CreatedAt time.Time `bson:"created_at"` UpdatedAt *time.Time `bson:"updated_at"` }
func NewUserDBValueFromUser ¶
func NewUserDBValueFromUser(user *entity.User) *UserDBValue
NewUserDBValueFromUser converts a user entity to a user value
func (*UserDBValue) ToUserEntity ¶
func (u *UserDBValue) ToUserEntity() *entity.User
ToUserEntity converts a user db value to a user entity
func (*UserDBValue) ToUserValue ¶
func (u *UserDBValue) ToUserValue() *UserValue
ToUserValue converts a user db value to a user value
type UserValue ¶
type UserValue struct { ID string `json:"id" bson:"_id"` // Account information Username string `json:"username" bson:"username"` Email string `json:"email" bson:"email"` // Timestamps CreatedAt time.Time `json:"created_at" bson:"created_at"` UpdatedAt *time.Time `json:"updated_at" bson:"updated_at"` }
func NewUserValueFromUser ¶
NewUserValueFromUser converts a user entity to a user value
Click to show internal directories.
Click to hide internal directories.