controller

package
v3.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIController added in v3.3.0

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

APIController for products

func (*APIController) Get added in v3.3.0

func (c *APIController) Get(ctx context.Context, r *web.Request) web.Result

Get Response for Product matching marketplacecode param @Summary Gets the requested product @Tags Product @Produce json @Success 200 {object} APIResult{product=domain.SimpleProduct} @Failure 500 {object} APIResult @Failure 404 {object} APIResult @Param marketplacecode path string true "the marketplace code (idendifier) for the product" @Router /api/v1/products/{marketplacecode} [get]

func (*APIController) Inject added in v3.3.0

func (c *APIController) Inject(responder *web.Responder,
	productService domain.ProductService,
	uRLService *application.URLService) *APIController

Inject dependencies

type APIResult added in v3.3.0

type APIResult struct {
	Error   *resultError
	Success bool
	Product domain.BasicProduct
}

APIResult view data

type View

type View struct {
	Responder             *web.Responder `inject:""`
	domain.ProductService `inject:""`
	URLService            *application.URLService `inject:""`

	Template string      `inject:"config:commerce.product.view.template"`
	Router   *web.Router `inject:""`
}

View demonstrates a product view controller

func (*View) Get

func (vc *View) Get(c context.Context, r *web.Request) web.Result

Get Response for Product matching sku param

Jump to

Keyboard shortcuts

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