Documentation ¶
Index ¶
- Constants
- type Codec
- func (codec *Codec) FromCreateUserRequestToUserModel(request entities.CreateUserRequest, hashedPassword string) models.User
- func (codec *Codec) FromGetUserRequestToUserModel(request entities.GetUserRequest) models.User
- func (codec *Codec) FromLoginRequestToUserModel(request entities.LoginRequest) models.User
- func (codec *Codec) FromSignupRequestToUserModel(request entities.SignupRequest, hashedPassword string) models.User
- func (codec *Codec) FromUpdateUserRequestToUserModel(request entities.UpdateUserRequest) models.User
- func (codec *Codec) FromUserModelToEntities(model models.User) entities.User
- type CodecI
Constants ¶
View Source
const (
VALID_EMAIL_REGEX = `^[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}$`
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec struct{}
func (*Codec) FromCreateUserRequestToUserModel ¶ added in v1.1.1
func (*Codec) FromGetUserRequestToUserModel ¶
func (codec *Codec) FromGetUserRequestToUserModel(request entities.GetUserRequest) models.User
func (*Codec) FromLoginRequestToUserModel ¶
func (codec *Codec) FromLoginRequestToUserModel(request entities.LoginRequest) models.User
func (*Codec) FromSignupRequestToUserModel ¶
func (*Codec) FromUpdateUserRequestToUserModel ¶
func (codec *Codec) FromUpdateUserRequestToUserModel(request entities.UpdateUserRequest) models.User
type CodecI ¶ added in v1.2.0
type CodecI interface { // --- From Requests to Models // - Auth FromSignupRequestToUserModel(request entities.SignupRequest, hashedPassword string) models.User FromLoginRequestToUserModel(request entities.LoginRequest) models.User // - Users FromCreateUserRequestToUserModel(request entities.CreateUserRequest, hashedPassword string) models.User FromGetUserRequestToUserModel(request entities.GetUserRequest) models.User FromUpdateUserRequestToUserModel(request entities.UpdateUserRequest) models.User // --- From Models to Entities FromUserModelToEntities(model models.User) entities.User }
Click to show internal directories.
Click to hide internal directories.