domain

package
v0.0.0-...-9b54d0a Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required,gte=6"`
}

Credentials

func (Credentials) Validate

func (i Credentials) Validate() error

Validate

type Product

type Product struct {
	Id    int    `csv:"-" json:"id" db:"id"`
	Name  string `csv:"PRODUCT NAME" json:"name" db:"name" binding:"required"`
	Price int    `csv:"PRICE" json:"price" db:"price" binding:"required"`
}

Product - product

type SignUpInput

type SignUpInput struct {
	Name     string `json:"name" validate:"required,gte=2"`
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required,gte=6"`
}

SignUpInput

func (SignUpInput) Validate

func (i SignUpInput) Validate() error

Validate

type UpdateProductInput

type UpdateProductInput struct {
	Name  *string `json:"name" db:"name"`
	Price *int    `json:"price" db:"price"`
}

UpdateProductInput - product update data

type User

type User struct {
	Id           int        `json:"-" db:"id"`
	Name         string     `json:"name" db:"name" binding:"required"`
	Email        string     `json:"email" db:"email" binding:"required"`
	Password     string     `json:"-" db:"password" binding:"required"`
	RegisteredAt *time.Time `json:"registered_at" db:"registered_at"`
}

User

Jump to

Keyboard shortcuts

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