Documentation ¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type Client
- func (c *Client) RetrieveDishByID(ctx context.Context, params RetrieveDishByIDParams) (RetrieveDishByIDRes, error)
- func (c *Client) RetrieveListOfRestaurants(ctx context.Context) (RetrieveListOfRestaurantsRes, error)
- func (c *Client) RetrieveMenuByID(ctx context.Context, params RetrieveMenuByIDParams) (RetrieveMenuByIDRes, error)
- func (c *Client) RetrieveMenusByRestaurant(ctx context.Context, params RetrieveMenusByRestaurantParams) (RetrieveMenusByRestaurantRes, error)
- func (c *Client) ValidateRestaurantDishes(ctx context.Context, request *ValidationList) (ValidateRestaurantDishesRes, error)
- type ClientOption
- type Dish
- func (s *Dish) Decode(d *jx.Decoder) error
- func (s *Dish) Encode(e *jx.Encoder)
- func (s *Dish) GetID() uuid.UUID
- func (s *Dish) GetImage() url.URL
- func (s *Dish) GetName() string
- func (s *Dish) GetPrice() float64
- func (s *Dish) MarshalJSON() ([]byte, error)
- func (s *Dish) SetID(val uuid.UUID)
- func (s *Dish) SetImage(val url.URL)
- func (s *Dish) SetName(val string)
- func (s *Dish) SetPrice(val float64)
- func (s *Dish) UnmarshalJSON(data []byte) error
- func (s *Dish) Validate() error
- type Error
- func (s *Error) Decode(d *jx.Decoder) error
- func (s *Error) Encode(e *jx.Encoder)
- func (s *Error) GetCode() float64
- func (s *Error) GetMessage() string
- func (s *Error) MarshalJSON() ([]byte, error)
- func (s *Error) SetCode(val float64)
- func (s *Error) SetMessage(val string)
- func (s *Error) UnmarshalJSON(data []byte) error
- func (s *Error) Validate() error
- type ErrorHandler
- type Handler
- type Invoker
- type Menu
- func (s *Menu) Decode(d *jx.Decoder) error
- func (s *Menu) Encode(e *jx.Encoder)
- func (s *Menu) GetDishes() []uuid.UUID
- func (s *Menu) GetID() uuid.UUID
- func (s *Menu) GetImage() url.URL
- func (s *Menu) GetName() string
- func (s *Menu) GetRestaurant() uuid.UUID
- func (s *Menu) MarshalJSON() ([]byte, error)
- func (s *Menu) SetDishes(val []uuid.UUID)
- func (s *Menu) SetID(val uuid.UUID)
- func (s *Menu) SetImage(val url.URL)
- func (s *Menu) SetName(val string)
- func (s *Menu) SetRestaurant(val uuid.UUID)
- func (s *Menu) UnmarshalJSON(data []byte) error
- func (s *Menu) Validate() error
- type Middleware
- type Option
- type RetrieveDishByIDInternalServerError
- func (s *RetrieveDishByIDInternalServerError) Decode(d *jx.Decoder) error
- func (s *RetrieveDishByIDInternalServerError) Encode(e *jx.Encoder)
- func (s *RetrieveDishByIDInternalServerError) MarshalJSON() ([]byte, error)
- func (s *RetrieveDishByIDInternalServerError) UnmarshalJSON(data []byte) error
- func (s *RetrieveDishByIDInternalServerError) Validate() error
- type RetrieveDishByIDNotFound
- func (s *RetrieveDishByIDNotFound) Decode(d *jx.Decoder) error
- func (s *RetrieveDishByIDNotFound) Encode(e *jx.Encoder)
- func (s *RetrieveDishByIDNotFound) MarshalJSON() ([]byte, error)
- func (s *RetrieveDishByIDNotFound) UnmarshalJSON(data []byte) error
- func (s *RetrieveDishByIDNotFound) Validate() error
- type RetrieveDishByIDParams
- type RetrieveDishByIDRes
- type RetrieveListOfRestaurantsOKApplicationJSON
- func (s *RetrieveListOfRestaurantsOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s RetrieveListOfRestaurantsOKApplicationJSON) Encode(e *jx.Encoder)
- func (s RetrieveListOfRestaurantsOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *RetrieveListOfRestaurantsOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s RetrieveListOfRestaurantsOKApplicationJSON) Validate() error
- type RetrieveListOfRestaurantsRes
- type RetrieveMenuByIDInternalServerError
- func (s *RetrieveMenuByIDInternalServerError) Decode(d *jx.Decoder) error
- func (s *RetrieveMenuByIDInternalServerError) Encode(e *jx.Encoder)
- func (s *RetrieveMenuByIDInternalServerError) MarshalJSON() ([]byte, error)
- func (s *RetrieveMenuByIDInternalServerError) UnmarshalJSON(data []byte) error
- func (s *RetrieveMenuByIDInternalServerError) Validate() error
- type RetrieveMenuByIDNotFound
- func (s *RetrieveMenuByIDNotFound) Decode(d *jx.Decoder) error
- func (s *RetrieveMenuByIDNotFound) Encode(e *jx.Encoder)
- func (s *RetrieveMenuByIDNotFound) MarshalJSON() ([]byte, error)
- func (s *RetrieveMenuByIDNotFound) UnmarshalJSON(data []byte) error
- func (s *RetrieveMenuByIDNotFound) Validate() error
- type RetrieveMenuByIDParams
- type RetrieveMenuByIDRes
- type RetrieveMenusByRestaurantInternalServerError
- func (s *RetrieveMenusByRestaurantInternalServerError) Decode(d *jx.Decoder) error
- func (s *RetrieveMenusByRestaurantInternalServerError) Encode(e *jx.Encoder)
- func (s *RetrieveMenusByRestaurantInternalServerError) MarshalJSON() ([]byte, error)
- func (s *RetrieveMenusByRestaurantInternalServerError) UnmarshalJSON(data []byte) error
- func (s *RetrieveMenusByRestaurantInternalServerError) Validate() error
- type RetrieveMenusByRestaurantNotFound
- func (s *RetrieveMenusByRestaurantNotFound) Decode(d *jx.Decoder) error
- func (s *RetrieveMenusByRestaurantNotFound) Encode(e *jx.Encoder)
- func (s *RetrieveMenusByRestaurantNotFound) MarshalJSON() ([]byte, error)
- func (s *RetrieveMenusByRestaurantNotFound) UnmarshalJSON(data []byte) error
- func (s *RetrieveMenusByRestaurantNotFound) Validate() error
- type RetrieveMenusByRestaurantOKApplicationJSON
- func (s *RetrieveMenusByRestaurantOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s RetrieveMenusByRestaurantOKApplicationJSON) Encode(e *jx.Encoder)
- func (s RetrieveMenusByRestaurantOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *RetrieveMenusByRestaurantOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s RetrieveMenusByRestaurantOKApplicationJSON) Validate() error
- type RetrieveMenusByRestaurantParams
- type RetrieveMenusByRestaurantRes
- type Route
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type UnimplementedHandler
- func (UnimplementedHandler) RetrieveDishByID(ctx context.Context, params RetrieveDishByIDParams) (r RetrieveDishByIDRes, _ error)
- func (UnimplementedHandler) RetrieveListOfRestaurants(ctx context.Context) (r RetrieveListOfRestaurantsRes, _ error)
- func (UnimplementedHandler) RetrieveMenuByID(ctx context.Context, params RetrieveMenuByIDParams) (r RetrieveMenuByIDRes, _ error)
- func (UnimplementedHandler) RetrieveMenusByRestaurant(ctx context.Context, params RetrieveMenusByRestaurantParams) (r RetrieveMenusByRestaurantRes, _ error)
- func (UnimplementedHandler) ValidateRestaurantDishes(ctx context.Context, req *ValidationList) (r ValidateRestaurantDishesRes, _ error)
- type ValidateRestaurantDishesBadRequest
- func (s *ValidateRestaurantDishesBadRequest) Decode(d *jx.Decoder) error
- func (s *ValidateRestaurantDishesBadRequest) Encode(e *jx.Encoder)
- func (s *ValidateRestaurantDishesBadRequest) MarshalJSON() ([]byte, error)
- func (s *ValidateRestaurantDishesBadRequest) UnmarshalJSON(data []byte) error
- func (s *ValidateRestaurantDishesBadRequest) Validate() error
- type ValidateRestaurantDishesInternalServerError
- func (s *ValidateRestaurantDishesInternalServerError) Decode(d *jx.Decoder) error
- func (s *ValidateRestaurantDishesInternalServerError) Encode(e *jx.Encoder)
- func (s *ValidateRestaurantDishesInternalServerError) MarshalJSON() ([]byte, error)
- func (s *ValidateRestaurantDishesInternalServerError) UnmarshalJSON(data []byte) error
- func (s *ValidateRestaurantDishesInternalServerError) Validate() error
- type ValidateRestaurantDishesNotFound
- func (s *ValidateRestaurantDishesNotFound) Decode(d *jx.Decoder) error
- func (s *ValidateRestaurantDishesNotFound) Encode(e *jx.Encoder)
- func (s *ValidateRestaurantDishesNotFound) MarshalJSON() ([]byte, error)
- func (s *ValidateRestaurantDishesNotFound) UnmarshalJSON(data []byte) error
- func (s *ValidateRestaurantDishesNotFound) Validate() error
- type ValidateRestaurantDishesOK
- type ValidateRestaurantDishesRes
- type ValidationList
- func (s *ValidationList) Decode(d *jx.Decoder) error
- func (s *ValidationList) Encode(e *jx.Encoder)
- func (s *ValidationList) GetDishes() []uuid.UUID
- func (s *ValidationList) GetRestaurant() uuid.UUID
- func (s *ValidationList) MarshalJSON() ([]byte, error)
- func (s *ValidationList) SetDishes(val []uuid.UUID)
- func (s *ValidationList) SetRestaurant(val uuid.UUID)
- func (s *ValidationList) UnmarshalJSON(data []byte) error
- func (s *ValidationList) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Dish) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Error ¶
Ref: #/components/schemas/Error
func (*Error) GetMessage ¶
GetMessage returns the value of Message.
func (*Error) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Error) SetMessage ¶
SetMessage sets the value of Message.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
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 ¶
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 (*Menu) GetRestaurant ¶
GetRestaurant returns the value of Restaurant.
func (*Menu) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Menu) SetRestaurant ¶
SetRestaurant sets the value of Restaurant.
func (*Menu) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
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 ¶
func (s *RetrieveDishByIDInternalServerError) Decode(d *jx.Decoder) error
Decode decodes RetrieveDishByIDInternalServerError from json.
func (*RetrieveDishByIDInternalServerError) Encode ¶
func (s *RetrieveDishByIDInternalServerError) Encode(e *jx.Encoder)
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 ¶
func (s *RetrieveDishByIDInternalServerError) Validate() error
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 ¶
RetrieveDishByIDParams is parameters of RetrieveDishByID operation.
type RetrieveDishByIDRes ¶
type RetrieveDishByIDRes interface {
// contains filtered or unexported methods
}
type RetrieveListOfRestaurantsOKApplicationJSON ¶
func (*RetrieveListOfRestaurantsOKApplicationJSON) Decode ¶
func (s *RetrieveListOfRestaurantsOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes RetrieveListOfRestaurantsOKApplicationJSON from json.
func (RetrieveListOfRestaurantsOKApplicationJSON) Encode ¶
func (s RetrieveListOfRestaurantsOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes RetrieveListOfRestaurantsOKApplicationJSON as json.
func (RetrieveListOfRestaurantsOKApplicationJSON) MarshalJSON ¶
func (s RetrieveListOfRestaurantsOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RetrieveListOfRestaurantsOKApplicationJSON) UnmarshalJSON ¶
func (s *RetrieveListOfRestaurantsOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (RetrieveListOfRestaurantsOKApplicationJSON) Validate ¶
func (s RetrieveListOfRestaurantsOKApplicationJSON) Validate() error
type RetrieveListOfRestaurantsRes ¶
type RetrieveListOfRestaurantsRes interface {
// contains filtered or unexported methods
}
type RetrieveMenuByIDInternalServerError ¶
type RetrieveMenuByIDInternalServerError Error
func (*RetrieveMenuByIDInternalServerError) Decode ¶
func (s *RetrieveMenuByIDInternalServerError) Decode(d *jx.Decoder) error
Decode decodes RetrieveMenuByIDInternalServerError from json.
func (*RetrieveMenuByIDInternalServerError) Encode ¶
func (s *RetrieveMenuByIDInternalServerError) Encode(e *jx.Encoder)
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 ¶
func (s *RetrieveMenuByIDInternalServerError) Validate() error
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 ¶
RetrieveMenuByIDParams is parameters of RetrieveMenuByID operation.
type RetrieveMenuByIDRes ¶
type RetrieveMenuByIDRes interface {
// contains filtered or unexported methods
}
type RetrieveMenusByRestaurantInternalServerError ¶
type RetrieveMenusByRestaurantInternalServerError Error
func (*RetrieveMenusByRestaurantInternalServerError) Decode ¶
func (s *RetrieveMenusByRestaurantInternalServerError) Decode(d *jx.Decoder) error
Decode decodes RetrieveMenusByRestaurantInternalServerError from json.
func (*RetrieveMenusByRestaurantInternalServerError) Encode ¶
func (s *RetrieveMenusByRestaurantInternalServerError) Encode(e *jx.Encoder)
Encode encodes RetrieveMenusByRestaurantInternalServerError as json.
func (*RetrieveMenusByRestaurantInternalServerError) MarshalJSON ¶
func (s *RetrieveMenusByRestaurantInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RetrieveMenusByRestaurantInternalServerError) UnmarshalJSON ¶
func (s *RetrieveMenusByRestaurantInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*RetrieveMenusByRestaurantInternalServerError) Validate ¶
func (s *RetrieveMenusByRestaurantInternalServerError) Validate() error
type RetrieveMenusByRestaurantNotFound ¶
type RetrieveMenusByRestaurantNotFound Error
func (*RetrieveMenusByRestaurantNotFound) Decode ¶
func (s *RetrieveMenusByRestaurantNotFound) Decode(d *jx.Decoder) error
Decode decodes RetrieveMenusByRestaurantNotFound from json.
func (*RetrieveMenusByRestaurantNotFound) Encode ¶
func (s *RetrieveMenusByRestaurantNotFound) Encode(e *jx.Encoder)
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 ¶
func (s *RetrieveMenusByRestaurantNotFound) Validate() error
type RetrieveMenusByRestaurantOKApplicationJSON ¶
type RetrieveMenusByRestaurantOKApplicationJSON []Menu
func (*RetrieveMenusByRestaurantOKApplicationJSON) Decode ¶
func (s *RetrieveMenusByRestaurantOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes RetrieveMenusByRestaurantOKApplicationJSON from json.
func (RetrieveMenusByRestaurantOKApplicationJSON) Encode ¶
func (s RetrieveMenusByRestaurantOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes RetrieveMenusByRestaurantOKApplicationJSON as json.
func (RetrieveMenusByRestaurantOKApplicationJSON) MarshalJSON ¶
func (s RetrieveMenusByRestaurantOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RetrieveMenusByRestaurantOKApplicationJSON) UnmarshalJSON ¶
func (s *RetrieveMenusByRestaurantOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (RetrieveMenusByRestaurantOKApplicationJSON) Validate ¶
func (s RetrieveMenusByRestaurantOKApplicationJSON) Validate() error
type RetrieveMenusByRestaurantParams ¶
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) OperationID ¶
OperationID returns OpenAPI operationId.
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.
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 ¶
func (UnimplementedHandler) RetrieveDishByID(ctx context.Context, params RetrieveDishByIDParams) (r RetrieveDishByIDRes, _ error)
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 ¶
func (UnimplementedHandler) RetrieveMenuByID(ctx context.Context, params RetrieveMenuByIDParams) (r RetrieveMenuByIDRes, _ error)
RetrieveMenuByID implements RetrieveMenuByID operation.
Retrieve menu data by its ID.
GET /menu/{id}
func (UnimplementedHandler) RetrieveMenusByRestaurant ¶
func (UnimplementedHandler) RetrieveMenusByRestaurant(ctx context.Context, params RetrieveMenusByRestaurantParams) (r RetrieveMenusByRestaurantRes, _ error)
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 ¶
func (s *ValidateRestaurantDishesBadRequest) Decode(d *jx.Decoder) error
Decode decodes ValidateRestaurantDishesBadRequest from json.
func (*ValidateRestaurantDishesBadRequest) Encode ¶
func (s *ValidateRestaurantDishesBadRequest) Encode(e *jx.Encoder)
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 ¶
func (s *ValidateRestaurantDishesBadRequest) Validate() error
type ValidateRestaurantDishesInternalServerError ¶
type ValidateRestaurantDishesInternalServerError Error
func (*ValidateRestaurantDishesInternalServerError) Decode ¶
func (s *ValidateRestaurantDishesInternalServerError) Decode(d *jx.Decoder) error
Decode decodes ValidateRestaurantDishesInternalServerError from json.
func (*ValidateRestaurantDishesInternalServerError) Encode ¶
func (s *ValidateRestaurantDishesInternalServerError) Encode(e *jx.Encoder)
Encode encodes ValidateRestaurantDishesInternalServerError as json.
func (*ValidateRestaurantDishesInternalServerError) MarshalJSON ¶
func (s *ValidateRestaurantDishesInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ValidateRestaurantDishesInternalServerError) UnmarshalJSON ¶
func (s *ValidateRestaurantDishesInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ValidateRestaurantDishesInternalServerError) Validate ¶
func (s *ValidateRestaurantDishesInternalServerError) Validate() error
type ValidateRestaurantDishesNotFound ¶
type ValidateRestaurantDishesNotFound Error
func (*ValidateRestaurantDishesNotFound) Decode ¶
func (s *ValidateRestaurantDishesNotFound) Decode(d *jx.Decoder) error
Decode decodes ValidateRestaurantDishesNotFound from json.
func (*ValidateRestaurantDishesNotFound) Encode ¶
func (s *ValidateRestaurantDishesNotFound) Encode(e *jx.Encoder)
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 ¶
func (s *ValidateRestaurantDishesNotFound) Validate() error
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
Source Files ¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_interfaces_gen.go
- oas_json_gen.go
- oas_middleware_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go