product

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProductCreateEndpoint = &xreq.Endpoint{
	Path:       "/products",
	Method:     http.MethodPost,
	Handler:    xreq.Convert(ProductCreateAction),
	Authorizer: iauth.FA(iauth.FeatureProduct, iauth.ActionCreate),
}

ProductCreateRoute route Auto Gen By ctrl, Modify as U Need

View Source
var ProductDeleteEndpoint = &xreq.Endpoint{
	Path:       "/products/{product_name}",
	Method:     http.MethodDelete,
	Handler:    xreq.Convert(ProductDeleteAction),
	Authorizer: iauth.FAP(iauth.FeatureProduct, iauth.ActionDelete),
}

ProductDeleteEndpoint Auto Gen By ctrl, Modify as U Need

View Source
var ProductListEndpoint = &xreq.Endpoint{
	Path:       "/products",
	Method:     http.MethodGet,
	Handler:    xreq.Convert(ProductListAction),
	Authorizer: iauth.FA(iauth.FeatureProduct, iauth.ActionRead),
}

ProductListRoute route Auto Gen By ctrl, Modify as U Need

View Source
var ProductOneEndpoint = &xreq.Endpoint{
	Path:       "/products/{product_name}",
	Method:     http.MethodGet,
	Handler:    xreq.Convert(ProductOneAction),
	Authorizer: iauth.FAP(iauth.FeatureProduct, iauth.ActionRead),
}

ProductOneRoute route Auto Gen By ctrl, Modify as U Need

View Source
var ProductUpdateEndpoint = &xreq.Endpoint{
	Path:       "/products/{product_name}",
	Method:     http.MethodPatch,
	Handler:    xreq.Convert(ProductUpdateAction),
	Authorizer: iauth.FAP(iauth.FeatureProduct, iauth.ActionUpdate),
}

ProductUpdateRoute Auto Gen By ctrl, Modify as U Need

Functions

func ProductCreateAction

func ProductCreateAction(req *http.Request) (interface{}, error)

ProductCreateAction add one Auto Gen By ctrl, Modify as U Need

func ProductCreateProcess

func ProductCreateProcess(ctx context.Context, param *ProductCreateParam) (*ibasic.Product, error)

func ProductDeleteAction

func ProductDeleteAction(req *http.Request) (interface{}, error)

ProductDeleteAction delete product Auto Gen By ctrl, Modify as U Need

func ProductListAction

func ProductListAction(req *http.Request) (interface{}, error)

ProductListAction get list Auto Gen By ctrl, Modify as U Need

func ProductOneAction

func ProductOneAction(req *http.Request) (interface{}, error)

ProductOneAction get one Auto Gen By ctrl, Modify as U Need

func ProductUpdateAction

func ProductUpdateAction(req *http.Request) (interface{}, error)

ProductUpdateAction 更新 Auto Gen By ctrl, Modify as U Need

Types

type ProductCreateParam

type ProductCreateParam struct {
	Name              string   `json:"name" validate:"required,min=2"`
	Description       string   `json:"description"`
	MailList          []string `json:"mail_list"`
	PhoneList         []string `json:"phone_list"`
	ContactPersonList []string `json:"contact_person_list"`
}

ProductCreateParam Param Auto Gen By ctrl, Modify as U Need

type ProductData

type ProductData struct {
	Id                int64    `json:"id,omitempty"`
	Name              string   `json:"name"`
	Description       string   `json:"description"`
	MailList          []string `json:"mail_list"`
	PhoneList         []string `json:"phone_list"`
	ContactPersonList []string `json:"contact_person_list"`
}

ProductData one response Auto Gen By ctrl, Modify as U Need

type ProductListParam

type ProductListParam struct {
	Domain  *string `form:"domain"`
	Cluster *string `form:"cluster"`
}

type ProductUpdateParam

type ProductUpdateParam struct {
	// Name              *string  `uri:"name" validate:"required,min=2"`
	Description       *string  `json:"description"`
	MailList          []string `json:"mail_list"`
	PhoneList         []string `json:"phone_list"`
	ContactPersonList []string `json:"contact_person_list"`
}

ProductUpdateParam Auto Gen By ctrl, Modify as U Need

Jump to

Keyboard shortcuts

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