models

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 5 Imported by: 0

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

func (m *GRPCServiceError) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*GRPCServiceError) Validate added in v1.2.0

func (m *GRPCServiceError) Validate(formats strfmt.Registry) error

Validate validates this g RPC service error

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

func (m *GenericError) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*GenericError) Validate

func (m *GenericError) Validate(formats strfmt.Registry) error

Validate validates this generic error

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

func (m *Product) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this product based on context it is used

func (*Product) MarshalBinary

func (m *Product) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Product) UnmarshalBinary

func (m *Product) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Product) Validate

func (m *Product) Validate(formats strfmt.Registry) error

Validate validates this product

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

func (m *ProductNotFoundError) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*ProductNotFoundError) Validate added in v1.2.0

func (m *ProductNotFoundError) Validate(formats strfmt.Registry) error

Validate validates this product not found error

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

func (m *ValidationErrors) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*ValidationErrors) Validate

func (m *ValidationErrors) Validate(formats strfmt.Registry) error

Validate validates this validation errors

Jump to

Keyboard shortcuts

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