domain

package
v0.0.0-...-0cd5e05 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateProductRequest

type CreateProductRequest struct {
	Name     string `validate:"required"`
	Price    int64  `validate:"required"`
	Quantity int32  `validate:"required"`
}

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required"`
}

type LoginResponse

type LoginResponse struct {
	Token string `json:"token"`
}

type Product

type Product struct {
	Id       string `json:"id" bson:"_id"`
	Name     string `json:"name" bson:"name"`
	Price    int64  `json:"price" bson:"price"`
	Quantity int32  `json:"quantity" bson:"quantity"`
}

type RegisterRequest

type RegisterRequest struct {
	Email          string `json:"email" validate:"required,email"`
	Password       string `json:"password" validate:"required"`
	FavoritePhrase string `json:"favorite_phrase" validate:"required"`
}

type RegisterResponse

type RegisterResponse struct {
	Id    string `json:"id"`
	Email string `json:"email"`
}

type User

type User struct {
	Id             string `json:"id" bson:"_id"`
	Email          string `json:"email" bson:"email"`
	Password       string `json:"password" bson:"password"`
	FavoritePhrase string `json:"favorite_phrase" bson:"favorite_phrase"`
}

Jump to

Keyboard shortcuts

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