Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCServiceError ¶ added in v1.2.0
type GRPCServiceError struct { // message Message string `json:"message,omitempty"` }
GRPCServiceError g RPC service error
swagger:model GRPCServiceError
func (*GRPCServiceError) ContextValidate ¶ added in v1.2.0
ContextValidate validates this g RPC service error based on context it is used
func (*GRPCServiceError) MarshalBinary ¶ added in v1.2.0
func (m *GRPCServiceError) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*GRPCServiceError) UnmarshalBinary ¶ added in v1.2.0
func (m *GRPCServiceError) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type GenericError ¶
type GenericError struct { // message Message string `json:"message,omitempty"` }
GenericError GenericError is a generic error message returned by a server.
swagger:model GenericError
func (*GenericError) ContextValidate ¶
ContextValidate validates this generic error based on context it is used
func (*GenericError) MarshalBinary ¶
func (m *GenericError) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*GenericError) UnmarshalBinary ¶
func (m *GenericError) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Product ¶
type Product struct { // ID // Minimum: 1 ID int64 `json:"id,omitempty"` // name // Required: true // Max Length: 255 Name *string `json:"name"` // price // Required: true // Minimum: 0.01 Price *float64 `json:"price"` // SKU - in the field of inventory management, a stock keeping unit is a distinct type of item for sale, purchased, or tracked in inventory, // such as a product or service, and all attributes associated with the item type that distinguish it from other item types. // For a product, these attributes can include manufacturer, description, material, size, color, packaging, and warranty terms. // When a business takes inventory of its stock, it counts the quantity it has of each SKU. // SKU can also refer to a unique identifier or code, sometimes represented via a barcode for scanning and tracking, that refers to the particular stock keeping unit. // These identifiers are not regulated or standardized. // When a company receives items from a vendor, it has a choice of maintaining the vendor's SKU or creating its own. // // Original source: https://en.wikipedia.org/wiki/Stock_keeping_unit // Required: true // Pattern: [a-z]+-[a-z]+-[a-z]+ SKU *string `json:"sku"` // updated at UpdatedAt string `json:"updatedAt,omitempty"` }
Product Product structure for an API model.
swagger:model Product
func (*Product) ContextValidate ¶
ContextValidate validates this product based on context it is used
func (*Product) MarshalBinary ¶
MarshalBinary interface implementation
func (*Product) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type ProductNotFoundError ¶ added in v1.2.0
type ProductNotFoundError struct { // ID ID int64 `json:"id,omitempty"` }
ProductNotFoundError product not found error
swagger:model ProductNotFoundError
func (*ProductNotFoundError) ContextValidate ¶ added in v1.2.0
ContextValidate validates this product not found error based on context it is used
func (*ProductNotFoundError) MarshalBinary ¶ added in v1.2.0
func (m *ProductNotFoundError) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ProductNotFoundError) UnmarshalBinary ¶ added in v1.2.0
func (m *ProductNotFoundError) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ValidationErrors ¶
type ValidationErrors struct { // messages Messages []string `json:"messages"` }
ValidationErrors ValidationErrors is a collection of validation error messages.
swagger:model ValidationErrors
func (*ValidationErrors) ContextValidate ¶
ContextValidate validates this validation errors based on context it is used
func (*ValidationErrors) MarshalBinary ¶
func (m *ValidationErrors) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ValidationErrors) UnmarshalBinary ¶
func (m *ValidationErrors) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation