dto

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 8 Imported by: 0

README

DTO (Data Transfer Object)

This directory contains Data Transfer Objects (DTOs) for HTTP requests and responses.

Directory Guidelines

  • You can create a subdirectory for each domain feature (e.g., user/, order/) to group related DTOs.
  • If the domain is simple, you may directly add the .go files in this directory.
Example Structure
dto
├── sub-directory           # when hit a complexity
│   └── dto_<group_name>_<some_action>.go
└── dto_some_action.go      # when simple implementation

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthLoginPayloadReqDTO

type AuthLoginPayloadReqDTO struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type AuthLoginReqDTO

type AuthLoginReqDTO struct {
	Payload AuthLoginPayloadReqDTO `in:"body=json" json:"payload"`
}

func (*AuthLoginReqDTO) IsEmailExists

func (a *AuthLoginReqDTO) IsEmailExists(ctx context.Context) validation.Rule

func (*AuthLoginReqDTO) ValidateWithContext

func (a *AuthLoginReqDTO) ValidateWithContext(ctx context.Context) error

Jump to

Keyboard shortcuts

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