product

package module
v0.0.0-...-ed03793 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Product

type Product struct {
	ID          string    `json:"id"`
	SellerID    string    `json:"sellerId"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Price       int64     `json:"price"`
	Quantity    int       `json:"quantity"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

type ProductAPI

type ProductAPI interface {
	Get(ctx context.Context, id string) (Product, error)
	Update(ctx context.Context, id string, form ProductForm) (Product, error)
}

type ProductForm

type ProductForm struct {
	SellerID    string `json:"sellerId"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Price       int64  `json:"price"`
	Quantity    int    `json:"quantity"`
}

Directories

Path Synopsis
pb
Package userauthmock is a generated GoMock package.
Package userauthmock is a generated GoMock package.

Jump to

Keyboard shortcuts

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