models

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {

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

APIError Api error

swagger:model ApiError

func (*APIError) ContextValidate

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

ContextValidate validates this Api error based on context it is used

func (*APIError) MarshalBinary

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

MarshalBinary interface implementation

func (*APIError) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*APIError) Validate

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

Validate validates this Api error

type Ingredient

type Ingredient struct {

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

	// id
	ID int64 `json:"id,omitempty" gorm:"primaryKey"`

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

Ingredient Meal Ingredient

An ingredient for a meal

swagger:model Ingredient

func (*Ingredient) ContextValidate

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

ContextValidate validates this ingredient based on context it is used

func (*Ingredient) MarshalBinary

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

MarshalBinary interface implementation

func (*Ingredient) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*Ingredient) Validate

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

Validate validates this ingredient

type Meal

type Meal struct {

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

	// id
	ID int64 `json:"id,omitempty" gorm:"primaryKey"`

	// ingredients
	Ingredients []*Ingredient `json:"ingredients" gorm:"many2many:meal_ingredients"`

	// kcal
	Kcal float64 `json:"kcal,omitempty"`

	// name
	// Required: true
	Name *string `json:"name"`

	// picture Url
	PictureURL string `json:"pictureUrl,omitempty"`

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

	// tags
	Tags []*Tag `json:"tags" gorm:"many2many:meal_tags"`
}

Meal Meal

A meal

swagger:model Meal

func (*Meal) ContextValidate

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

ContextValidate validate this meal based on the context it is used

func (*Meal) MarshalBinary

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

MarshalBinary interface implementation

func (*Meal) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*Meal) Validate

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

Validate validates this meal

type Tag

type Tag struct {

	// id
	ID int64 `json:"id,omitempty" gorm:"primaryKey"`

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

Tag Meal Tag

A tag for a meal

swagger:model Tag

func (*Tag) ContextValidate

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

ContextValidate validates this tag based on context it is used

func (*Tag) MarshalBinary

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

MarshalBinary interface implementation

func (*Tag) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*Tag) Validate

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

Validate validates this tag

type Version

type Version struct {

	// app name
	AppName string `json:"appName,omitempty"`

	// build time
	BuildTime string `json:"buildTime,omitempty"`

	// go mod
	GoMod string `json:"goMod,omitempty"`

	// version
	Version string `json:"version,omitempty"`
}

Version Version

Version and build info

swagger:model Version

func (*Version) ContextValidate

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

ContextValidate validates this version based on context it is used

func (*Version) MarshalBinary

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

MarshalBinary interface implementation

func (*Version) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*Version) Validate

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

Validate validates this version

Jump to

Keyboard shortcuts

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