adapter

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddProductRequest

type AddProductRequest struct {
	ID          string  `json:"id"`
	Name        string  `json:"name"`
	Description string  `json:"description"`
	Price       float64 `json:"price"`
}

type AddProductResponse

type AddProductResponse struct {
	ID          string  `json:"id"`
	Name        string  `json:"name"`
	Description string  `json:"description"`
	Price       float64 `json:"price"`
	CreatedAt   string  `json:"created_at"`
	UpdatedAt   string  `json:"updated_at"`
}

type DeleteProductRequest

type DeleteProductRequest struct {
	ID string `json:"id"`
}

type GetAllProductsResponse

type GetAllProductsResponse struct {
	ID          string  `json:"id"`
	Name        string  `json:"name"`
	Description string  `json:"description"`
	Price       float64 `json:"price"`
	CreatedAt   string  `json:"created_at"`
	UpdatedAt   string  `json:"updated_at"`
}

type GetProductRequest

type GetProductRequest struct {
	ID string `json:"id"`
}

type GetProductResponse

type GetProductResponse struct {
	ID          string  `json:"id"`
	Name        string  `json:"name"`
	Description string  `json:"description"`
	Price       float64 `json:"price"`
	CreatedAt   string  `json:"created_at"`
	UpdatedAt   string  `json:"updated_at"`
}

type HTTPAddProductAdapterOption added in v0.0.2

type HTTPAddProductAdapterOption func(*NetHTTPAddProductAdapter) error

func WithMethodGuard added in v0.0.2

func WithMethodGuard(methodGuard pkghttp.HttpMethodGuard) HTTPAddProductAdapterOption

func WithService added in v0.0.2

type NetHTTPAddProductAdapter

type NetHTTPAddProductAdapter struct {
	// contains filtered or unexported fields
}

func (*NetHTTPAddProductAdapter) Handle

type NetHTTPDeleteProductAdapter

type NetHTTPDeleteProductAdapter struct {
	// contains filtered or unexported fields
}

func (*NetHTTPDeleteProductAdapter) Handle

type NetHTTPGetAllProductsAdapter

type NetHTTPGetAllProductsAdapter struct {
	// contains filtered or unexported fields
}

func (*NetHTTPGetAllProductsAdapter) Handle

type NetHTTPGetProductAdapter

type NetHTTPGetProductAdapter struct {
	// contains filtered or unexported fields
}

func NewNetHTTPGetProductAdapter

func NewNetHTTPGetProductAdapter(useCase application.GetProductUseCase) *NetHTTPGetProductAdapter

func (*NetHTTPGetProductAdapter) Handle

type NetHTTPUpdateProductAdapter

type NetHTTPUpdateProductAdapter struct {
	// contains filtered or unexported fields
}

func (*NetHTTPUpdateProductAdapter) Handle

type UpdateProductRequest

type UpdateProductRequest struct {
	Name        *string  `json:"name"`
	Description *string  `json:"description"`
	Price       *float64 `json:"price"`
}

type UpdateProductResponse

type UpdateProductResponse struct {
	ID          string  `json:"id"`
	Name        string  `json:"name"`
	Description string  `json:"description"`
	Price       float64 `json:"price"`
	CreatedAt   string  `json:"created_at"`
	UpdatedAt   string  `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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