api

package
v0.0.0-...-345d9e2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements OAS client.

func NewClient

func NewClient(serverURL string, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) RetrieveDishByID

func (c *Client) RetrieveDishByID(ctx context.Context, params RetrieveDishByIDParams) (RetrieveDishByIDRes, error)

RetrieveDishByID invokes RetrieveDishByID operation.

Retrieve dish by its ID.

GET /dish/{id}

func (*Client) RetrieveListOfRestaurants

func (c *Client) RetrieveListOfRestaurants(ctx context.Context) (RetrieveListOfRestaurantsRes, error)

RetrieveListOfRestaurants invokes RetrieveListOfRestaurants operation.

Retrieve list of IDs of restaurants.

GET /restaurant

func (*Client) RetrieveMenuByID

func (c *Client) RetrieveMenuByID(ctx context.Context, params RetrieveMenuByIDParams) (RetrieveMenuByIDRes, error)

RetrieveMenuByID invokes RetrieveMenuByID operation.

Retrieve menu data by its ID.

GET /menu/{id}

func (*Client) RetrieveMenusByRestaurant

func (c *Client) RetrieveMenusByRestaurant(ctx context.Context, params RetrieveMenusByRestaurantParams) (RetrieveMenusByRestaurantRes, error)

RetrieveMenusByRestaurant invokes RetrieveMenusByRestaurant operation.

Retrieve menu data by its restaurant's ID.

GET /menu/restaurant/{id}

func (*Client) ValidateRestaurantDishes

func (c *Client) ValidateRestaurantDishes(ctx context.Context, request *ValidationList) (ValidateRestaurantDishesRes, error)

ValidateRestaurantDishes invokes ValidateRestaurantDishes operation.

Validates restaurant ownership for dishes.

POST /restaurant/validate-dishes

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

ClientOption is client config option.

func WithClient

func WithClient(client ht.Client) ClientOption

WithClient specifies http client to use.

type Dish

type Dish struct {
	ID    uuid.UUID `json:"id"`
	Name  string    `json:"name"`
	Image url.URL   `json:"image"`
	Price float64   `json:"price"`
}

Ref: #/components/schemas/Dish

func (*Dish) Decode

func (s *Dish) Decode(d *jx.Decoder) error

Decode decodes Dish from json.

func (*Dish) Encode

func (s *Dish) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Dish) GetID

func (s *Dish) GetID() uuid.UUID

GetID returns the value of ID.

func (*Dish) GetImage

func (s *Dish) GetImage() url.URL

GetImage returns the value of Image.

func (*Dish) GetName

func (s *Dish) GetName() string

GetName returns the value of Name.

func (*Dish) GetPrice

func (s *Dish) GetPrice() float64

GetPrice returns the value of Price.

func (*Dish) MarshalJSON

func (s *Dish) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Dish) SetID

func (s *Dish) SetID(val uuid.UUID)

SetID sets the value of ID.

func (*Dish) SetImage

func (s *Dish) SetImage(val url.URL)

SetImage sets the value of Image.

func (*Dish) SetName

func (s *Dish) SetName(val string)

SetName sets the value of Name.

func (*Dish) SetPrice

func (s *Dish) SetPrice(val float64)

SetPrice sets the value of Price.

func (*Dish) UnmarshalJSON

func (s *Dish) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Dish) Validate

func (s *Dish) Validate() error

type Error

type Error struct {
	Code    float64 `json:"code"`
	Message string  `json:"message"`
}

Ref: #/components/schemas/Error

func (*Error) Decode

func (s *Error) Decode(d *jx.Decoder) error

Decode decodes Error from json.

func (*Error) Encode

func (s *Error) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Error) GetCode

func (s *Error) GetCode() float64

GetCode returns the value of Code.

func (*Error) GetMessage

func (s *Error) GetMessage() string

GetMessage returns the value of Message.

func (*Error) MarshalJSON

func (s *Error) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Error) SetCode

func (s *Error) SetCode(val float64)

SetCode sets the value of Code.

func (*Error) SetMessage

func (s *Error) SetMessage(val string)

SetMessage sets the value of Message.

func (*Error) UnmarshalJSON

func (s *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Error) Validate

func (s *Error) Validate() error

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type Handler

type Handler interface {
	// RetrieveDishByID implements RetrieveDishByID operation.
	//
	// Retrieve dish by its ID.
	//
	// GET /dish/{id}
	RetrieveDishByID(ctx context.Context, params RetrieveDishByIDParams) (RetrieveDishByIDRes, error)
	// RetrieveListOfRestaurants implements RetrieveListOfRestaurants operation.
	//
	// Retrieve list of IDs of restaurants.
	//
	// GET /restaurant
	RetrieveListOfRestaurants(ctx context.Context) (RetrieveListOfRestaurantsRes, error)
	// RetrieveMenuByID implements RetrieveMenuByID operation.
	//
	// Retrieve menu data by its ID.
	//
	// GET /menu/{id}
	RetrieveMenuByID(ctx context.Context, params RetrieveMenuByIDParams) (RetrieveMenuByIDRes, error)
	// RetrieveMenusByRestaurant implements RetrieveMenusByRestaurant operation.
	//
	// Retrieve menu data by its restaurant's ID.
	//
	// GET /menu/restaurant/{id}
	RetrieveMenusByRestaurant(ctx context.Context, params RetrieveMenusByRestaurantParams) (RetrieveMenusByRestaurantRes, error)
	// ValidateRestaurantDishes implements ValidateRestaurantDishes operation.
	//
	// Validates restaurant ownership for dishes.
	//
	// POST /restaurant/validate-dishes
	ValidateRestaurantDishes(ctx context.Context, req *ValidationList) (ValidateRestaurantDishesRes, error)
}

Handler handles operations described by OpenAPI v3 specification.

type Invoker

type Invoker interface {
	// RetrieveDishByID invokes RetrieveDishByID operation.
	//
	// Retrieve dish by its ID.
	//
	// GET /dish/{id}
	RetrieveDishByID(ctx context.Context, params RetrieveDishByIDParams) (RetrieveDishByIDRes, error)
	// RetrieveListOfRestaurants invokes RetrieveListOfRestaurants operation.
	//
	// Retrieve list of IDs of restaurants.
	//
	// GET /restaurant
	RetrieveListOfRestaurants(ctx context.Context) (RetrieveListOfRestaurantsRes, error)
	// RetrieveMenuByID invokes RetrieveMenuByID operation.
	//
	// Retrieve menu data by its ID.
	//
	// GET /menu/{id}
	RetrieveMenuByID(ctx context.Context, params RetrieveMenuByIDParams) (RetrieveMenuByIDRes, error)
	// RetrieveMenusByRestaurant invokes RetrieveMenusByRestaurant operation.
	//
	// Retrieve menu data by its restaurant's ID.
	//
	// GET /menu/restaurant/{id}
	RetrieveMenusByRestaurant(ctx context.Context, params RetrieveMenusByRestaurantParams) (RetrieveMenusByRestaurantRes, error)
	// ValidateRestaurantDishes invokes ValidateRestaurantDishes operation.
	//
	// Validates restaurant ownership for dishes.
	//
	// POST /restaurant/validate-dishes
	ValidateRestaurantDishes(ctx context.Context, request *ValidationList) (ValidateRestaurantDishesRes, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type Menu struct {
	ID         uuid.UUID   `json:"id"`
	Name       string      `json:"name"`
	Restaurant uuid.UUID   `json:"restaurant"`
	Image      url.URL     `json:"image"`
	Dishes     []uuid.UUID `json:"dishes"`
}

Ref: #/components/schemas/Menu

func (s *Menu) Decode(d *jx.Decoder) error

Decode decodes Menu from json.

func (s *Menu) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (s *Menu) GetDishes() []uuid.UUID

GetDishes returns the value of Dishes.

func (s *Menu) GetID() uuid.UUID

GetID returns the value of ID.

func (s *Menu) GetImage() url.URL

GetImage returns the value of Image.

func (s *Menu) GetName() string

GetName returns the value of Name.

func (s *Menu) GetRestaurant() uuid.UUID

GetRestaurant returns the value of Restaurant.

func (s *Menu) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (s *Menu) SetDishes(val []uuid.UUID)

SetDishes sets the value of Dishes.

func (s *Menu) SetID(val uuid.UUID)

SetID sets the value of ID.

func (s *Menu) SetImage(val url.URL)

SetImage sets the value of Image.

func (s *Menu) SetName(val string)

SetName sets the value of Name.

func (s *Menu) SetRestaurant(val uuid.UUID)

SetRestaurant sets the value of Restaurant.

func (s *Menu) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (s *Menu) Validate() error

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type Option

type Option interface {
	ServerOption
	ClientOption
}

Option is config option.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider specifies a meter provider to use for creating a meter.

If none is specified, the otel.GetMeterProvider() is used.

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider specifies a tracer provider to use for creating a tracer.

If none is specified, the global provider is used.

type RetrieveDishByIDInternalServerError

type RetrieveDishByIDInternalServerError Error

func (*RetrieveDishByIDInternalServerError) Decode

Decode decodes RetrieveDishByIDInternalServerError from json.

func (*RetrieveDishByIDInternalServerError) Encode

Encode encodes RetrieveDishByIDInternalServerError as json.

func (*RetrieveDishByIDInternalServerError) MarshalJSON

func (s *RetrieveDishByIDInternalServerError) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*RetrieveDishByIDInternalServerError) UnmarshalJSON

func (s *RetrieveDishByIDInternalServerError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*RetrieveDishByIDInternalServerError) Validate

type RetrieveDishByIDNotFound

type RetrieveDishByIDNotFound Error

func (*RetrieveDishByIDNotFound) Decode

func (s *RetrieveDishByIDNotFound) Decode(d *jx.Decoder) error

Decode decodes RetrieveDishByIDNotFound from json.

func (*RetrieveDishByIDNotFound) Encode

func (s *RetrieveDishByIDNotFound) Encode(e *jx.Encoder)

Encode encodes RetrieveDishByIDNotFound as json.

func (*RetrieveDishByIDNotFound) MarshalJSON

func (s *RetrieveDishByIDNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*RetrieveDishByIDNotFound) UnmarshalJSON

func (s *RetrieveDishByIDNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*RetrieveDishByIDNotFound) Validate

func (s *RetrieveDishByIDNotFound) Validate() error

type RetrieveDishByIDParams

type RetrieveDishByIDParams struct {
	// The ID of the dish to retrieve.
	ID uuid.UUID
}

RetrieveDishByIDParams is parameters of RetrieveDishByID operation.

type RetrieveDishByIDRes

type RetrieveDishByIDRes interface {
	// contains filtered or unexported methods
}

type RetrieveListOfRestaurantsOKApplicationJSON

type RetrieveListOfRestaurantsOKApplicationJSON []uuid.UUID

func (*RetrieveListOfRestaurantsOKApplicationJSON) Decode

Decode decodes RetrieveListOfRestaurantsOKApplicationJSON from json.

func (RetrieveListOfRestaurantsOKApplicationJSON) Encode

Encode encodes RetrieveListOfRestaurantsOKApplicationJSON as json.

func (RetrieveListOfRestaurantsOKApplicationJSON) MarshalJSON

MarshalJSON implements stdjson.Marshaler.

func (*RetrieveListOfRestaurantsOKApplicationJSON) UnmarshalJSON

func (s *RetrieveListOfRestaurantsOKApplicationJSON) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (RetrieveListOfRestaurantsOKApplicationJSON) Validate

type RetrieveListOfRestaurantsRes

type RetrieveListOfRestaurantsRes interface {
	// contains filtered or unexported methods
}

type RetrieveMenuByIDInternalServerError

type RetrieveMenuByIDInternalServerError Error

func (*RetrieveMenuByIDInternalServerError) Decode

Decode decodes RetrieveMenuByIDInternalServerError from json.

func (*RetrieveMenuByIDInternalServerError) Encode

Encode encodes RetrieveMenuByIDInternalServerError as json.

func (*RetrieveMenuByIDInternalServerError) MarshalJSON

func (s *RetrieveMenuByIDInternalServerError) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*RetrieveMenuByIDInternalServerError) UnmarshalJSON

func (s *RetrieveMenuByIDInternalServerError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*RetrieveMenuByIDInternalServerError) Validate

type RetrieveMenuByIDNotFound

type RetrieveMenuByIDNotFound Error

func (*RetrieveMenuByIDNotFound) Decode

func (s *RetrieveMenuByIDNotFound) Decode(d *jx.Decoder) error

Decode decodes RetrieveMenuByIDNotFound from json.

func (*RetrieveMenuByIDNotFound) Encode

func (s *RetrieveMenuByIDNotFound) Encode(e *jx.Encoder)

Encode encodes RetrieveMenuByIDNotFound as json.

func (*RetrieveMenuByIDNotFound) MarshalJSON

func (s *RetrieveMenuByIDNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*RetrieveMenuByIDNotFound) UnmarshalJSON

func (s *RetrieveMenuByIDNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*RetrieveMenuByIDNotFound) Validate

func (s *RetrieveMenuByIDNotFound) Validate() error

type RetrieveMenuByIDParams

type RetrieveMenuByIDParams struct {
	// The ID of the menu to retrieve.
	ID uuid.UUID
}

RetrieveMenuByIDParams is parameters of RetrieveMenuByID operation.

type RetrieveMenuByIDRes

type RetrieveMenuByIDRes interface {
	// contains filtered or unexported methods
}

type RetrieveMenusByRestaurantInternalServerError

type RetrieveMenusByRestaurantInternalServerError Error

func (*RetrieveMenusByRestaurantInternalServerError) Decode

Decode decodes RetrieveMenusByRestaurantInternalServerError from json.

func (*RetrieveMenusByRestaurantInternalServerError) Encode

Encode encodes RetrieveMenusByRestaurantInternalServerError as json.

func (*RetrieveMenusByRestaurantInternalServerError) MarshalJSON

MarshalJSON implements stdjson.Marshaler.

func (*RetrieveMenusByRestaurantInternalServerError) UnmarshalJSON

func (s *RetrieveMenusByRestaurantInternalServerError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*RetrieveMenusByRestaurantInternalServerError) Validate

type RetrieveMenusByRestaurantNotFound

type RetrieveMenusByRestaurantNotFound Error

func (*RetrieveMenusByRestaurantNotFound) Decode

Decode decodes RetrieveMenusByRestaurantNotFound from json.

func (*RetrieveMenusByRestaurantNotFound) Encode

Encode encodes RetrieveMenusByRestaurantNotFound as json.

func (*RetrieveMenusByRestaurantNotFound) MarshalJSON

func (s *RetrieveMenusByRestaurantNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*RetrieveMenusByRestaurantNotFound) UnmarshalJSON

func (s *RetrieveMenusByRestaurantNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*RetrieveMenusByRestaurantNotFound) Validate

type RetrieveMenusByRestaurantOKApplicationJSON

type RetrieveMenusByRestaurantOKApplicationJSON []Menu

func (*RetrieveMenusByRestaurantOKApplicationJSON) Decode

Decode decodes RetrieveMenusByRestaurantOKApplicationJSON from json.

func (RetrieveMenusByRestaurantOKApplicationJSON) Encode

Encode encodes RetrieveMenusByRestaurantOKApplicationJSON as json.

func (RetrieveMenusByRestaurantOKApplicationJSON) MarshalJSON

MarshalJSON implements stdjson.Marshaler.

func (*RetrieveMenusByRestaurantOKApplicationJSON) UnmarshalJSON

func (s *RetrieveMenusByRestaurantOKApplicationJSON) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (RetrieveMenusByRestaurantOKApplicationJSON) Validate

type RetrieveMenusByRestaurantParams

type RetrieveMenusByRestaurantParams struct {
	// The ID of the restaurant.
	ID uuid.UUID
}

RetrieveMenusByRestaurantParams is parameters of RetrieveMenusByRestaurant operation.

type RetrieveMenusByRestaurantRes

type RetrieveMenusByRestaurantRes interface {
	// contains filtered or unexported methods
}

type Route

type Route struct {
	// contains filtered or unexported fields
}

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.

func NewServer

func NewServer(h Handler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

type ServerOption

type ServerOption interface {
	// contains filtered or unexported methods
}

ServerOption is server config option.

func WithErrorHandler

func WithErrorHandler(h ErrorHandler) ServerOption

WithErrorHandler specifies error handler to use.

func WithMaxMultipartMemory

func WithMaxMultipartMemory(max int64) ServerOption

WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.

func WithMethodNotAllowed

func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption

WithMethodNotAllowed specifies Method Not Allowed handler to use.

func WithMiddleware

func WithMiddleware(m ...Middleware) ServerOption

WithMiddleware specifies middlewares to use.

func WithNotFound

func WithNotFound(notFound http.HandlerFunc) ServerOption

WithNotFound specifies Not Found handler to use.

func WithPathPrefix

func WithPathPrefix(prefix string) ServerOption

WithPathPrefix specifies server path prefix.

type UnimplementedHandler

type UnimplementedHandler struct{}

UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.

func (UnimplementedHandler) RetrieveDishByID

RetrieveDishByID implements RetrieveDishByID operation.

Retrieve dish by its ID.

GET /dish/{id}

func (UnimplementedHandler) RetrieveListOfRestaurants

func (UnimplementedHandler) RetrieveListOfRestaurants(ctx context.Context) (r RetrieveListOfRestaurantsRes, _ error)

RetrieveListOfRestaurants implements RetrieveListOfRestaurants operation.

Retrieve list of IDs of restaurants.

GET /restaurant

func (UnimplementedHandler) RetrieveMenuByID

RetrieveMenuByID implements RetrieveMenuByID operation.

Retrieve menu data by its ID.

GET /menu/{id}

func (UnimplementedHandler) RetrieveMenusByRestaurant

RetrieveMenusByRestaurant implements RetrieveMenusByRestaurant operation.

Retrieve menu data by its restaurant's ID.

GET /menu/restaurant/{id}

func (UnimplementedHandler) ValidateRestaurantDishes

func (UnimplementedHandler) ValidateRestaurantDishes(ctx context.Context, req *ValidationList) (r ValidateRestaurantDishesRes, _ error)

ValidateRestaurantDishes implements ValidateRestaurantDishes operation.

Validates restaurant ownership for dishes.

POST /restaurant/validate-dishes

type ValidateRestaurantDishesBadRequest

type ValidateRestaurantDishesBadRequest Error

func (*ValidateRestaurantDishesBadRequest) Decode

Decode decodes ValidateRestaurantDishesBadRequest from json.

func (*ValidateRestaurantDishesBadRequest) Encode

Encode encodes ValidateRestaurantDishesBadRequest as json.

func (*ValidateRestaurantDishesBadRequest) MarshalJSON

func (s *ValidateRestaurantDishesBadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ValidateRestaurantDishesBadRequest) UnmarshalJSON

func (s *ValidateRestaurantDishesBadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ValidateRestaurantDishesBadRequest) Validate

type ValidateRestaurantDishesInternalServerError

type ValidateRestaurantDishesInternalServerError Error

func (*ValidateRestaurantDishesInternalServerError) Decode

Decode decodes ValidateRestaurantDishesInternalServerError from json.

func (*ValidateRestaurantDishesInternalServerError) Encode

Encode encodes ValidateRestaurantDishesInternalServerError as json.

func (*ValidateRestaurantDishesInternalServerError) MarshalJSON

MarshalJSON implements stdjson.Marshaler.

func (*ValidateRestaurantDishesInternalServerError) UnmarshalJSON

func (s *ValidateRestaurantDishesInternalServerError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ValidateRestaurantDishesInternalServerError) Validate

type ValidateRestaurantDishesNotFound

type ValidateRestaurantDishesNotFound Error

func (*ValidateRestaurantDishesNotFound) Decode

Decode decodes ValidateRestaurantDishesNotFound from json.

func (*ValidateRestaurantDishesNotFound) Encode

Encode encodes ValidateRestaurantDishesNotFound as json.

func (*ValidateRestaurantDishesNotFound) MarshalJSON

func (s *ValidateRestaurantDishesNotFound) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ValidateRestaurantDishesNotFound) UnmarshalJSON

func (s *ValidateRestaurantDishesNotFound) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ValidateRestaurantDishesNotFound) Validate

type ValidateRestaurantDishesOK

type ValidateRestaurantDishesOK struct{}

ValidateRestaurantDishesOK is response for ValidateRestaurantDishes operation.

type ValidateRestaurantDishesRes

type ValidateRestaurantDishesRes interface {
	// contains filtered or unexported methods
}

type ValidationList

type ValidationList struct {
	Restaurant uuid.UUID   `json:"restaurant"`
	Dishes     []uuid.UUID `json:"dishes"`
}

Ref: #/components/schemas/ValidationList

func (*ValidationList) Decode

func (s *ValidationList) Decode(d *jx.Decoder) error

Decode decodes ValidationList from json.

func (*ValidationList) Encode

func (s *ValidationList) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ValidationList) GetDishes

func (s *ValidationList) GetDishes() []uuid.UUID

GetDishes returns the value of Dishes.

func (*ValidationList) GetRestaurant

func (s *ValidationList) GetRestaurant() uuid.UUID

GetRestaurant returns the value of Restaurant.

func (*ValidationList) MarshalJSON

func (s *ValidationList) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ValidationList) SetDishes

func (s *ValidationList) SetDishes(val []uuid.UUID)

SetDishes sets the value of Dishes.

func (*ValidationList) SetRestaurant

func (s *ValidationList) SetRestaurant(val uuid.UUID)

SetRestaurant sets the value of Restaurant.

func (*ValidationList) UnmarshalJSON

func (s *ValidationList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ValidationList) Validate

func (s *ValidationList) Validate() error

Jump to

Keyboard shortcuts

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