dto

package
v0.0.0-...-58191dd Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomerCreateReq

type CustomerCreateReq struct {
	Firstname string `json:"firstname" binding:"required"`
	Lastname  string `json:"lastname" binding:"required"`
	Email     string `json:"email" binding:"required,email"`
}

func (*CustomerCreateReq) MapToModel

func (req *CustomerCreateReq) MapToModel() model.Customer

type ErrorMessage

type ErrorMessage struct {
	Message     string
	Description string
}

func NewErrorMessage

func NewErrorMessage(msg, desc string) *ErrorMessage

type IdResponse

type IdResponse struct {
	Id int64 `json:"id"`
}

func NewIdResponse

func NewIdResponse(id int64) *IdResponse

type NextIdResponse

type NextIdResponse struct {
	LastErrorObject struct {
		N               int  `json:"n"`
		UpdatedExisting bool `json:"updatedExisting"`
	} `json:"lastErrorObject"`
	Value struct {
		Id  string `json:"_id"`
		Seq int64  `json:"seq" binding:"required"`
	} `json:"value"`
	Ok float64 `json:"ok"`
}

type SellerCreateReq

type SellerCreateReq struct {
	Name  string `json:"name" binding:"required"`
	Email string `json:"email" binding:"required,email"`
}

func (*SellerCreateReq) MapToModel

func (req *SellerCreateReq) MapToModel() model.Seller

Jump to

Keyboard shortcuts

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