models

package
v0.0.0-...-17d54ed Latest Latest
Warning

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

Go to latest
Published: Apr 7, 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 GenericError

type GenericError struct {

	// message
	Message string `json:"message,omitempty"`
}

GenericError 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 {

	// description
	Description string `json:"description,omitempty"`

	// the id for this model
	// Required: true
	// Minimum: 1
	ID *int64 `json:"id"`

	// name
	Name string `json:"name,omitempty"`

	// price
	Price float32 `json:"price,omitempty"`

	// s k u
	SKU string `json:"sku,omitempty"`
}

Product Product Product defines the structure for an API product swagger: 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 ValidationError

type ValidationError struct {

	// messages
	Messages []string `json:"messages"`
}

ValidationError ValidationError ValidationError is a collection of validation error messages

swagger:model ValidationError

func (*ValidationError) ContextValidate

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

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

func (*ValidationError) Validate

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

Validate validates this validation error

Jump to

Keyboard shortcuts

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