codec

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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 NewCodec

func NewCodec() *Codec

func (*Codec) FromCreateUserRequestToUserModel added in v1.1.1

func (codec *Codec) FromCreateUserRequestToUserModel(request entities.CreateUserRequest, hashedPassword string) models.User

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 *Codec) FromSignupRequestToUserModel(request entities.SignupRequest, hashedPassword string) models.User

func (*Codec) FromUpdateUserRequestToUserModel

func (codec *Codec) FromUpdateUserRequestToUserModel(request entities.UpdateUserRequest) models.User

func (*Codec) FromUserModelToEntities

func (codec *Codec) FromUserModelToEntities(model models.User) entities.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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL