Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 {
// the description for this poduct
// Max Length: 10000
Description string `json:"description,omitempty"`
// the id for this product
// Required: true
ID *int64 `json:"id"`
// the name for this poduct
// Required: true
// Max Length: 255
Name *string `json:"name"`
// the price for the product
// Required: true
// Minimum: 0.01
Price *float32 `json:"price"`
// the SKU for the product
// Required: true
// Pattern: [a-z]+-[a-z]+-[a-z]+
SKU *string `json:"sku"`
}
Product Product defines the structure for an API product.
Product also has relevant struct tags for validation and json encoding.
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 ValidationError ¶
type ValidationError struct {
// messages
Messages []string `json:"messages"`
}
ValidationError ValidationError is a collection of validation error messages
swagger:model ValidationError
func (*ValidationError) ContextValidate ¶
ContextValidate validates this validation error based on context it is used
func (*ValidationError) MarshalBinary ¶
func (m *ValidationError) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ValidationError) UnmarshalBinary ¶
func (m *ValidationError) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation