api

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright 2019 DeepMap, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

This is an autogenerated file, any edits which you make here will be lost!

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger added in v1.0.3

func GetSwagger() (*openapi3.Swagger, error)

Returns the Swagger specification corresponding to the generated code in this file.

func NewAddPetRequest added in v1.1.0

func NewAddPetRequest(server string, body NewPet) (*http.Request, error)

Request generator for AddPet with JSON body

func NewAddPetRequestWithBody added in v1.1.0

func NewAddPetRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

Request generator for AddPet with non-JSON body

func NewDeletePetRequest added in v1.1.0

func NewDeletePetRequest(server string, id int64) (*http.Request, error)

Request generator for DeletePet

func NewFindPetByIdRequest added in v1.1.0

func NewFindPetByIdRequest(server string, id int64) (*http.Request, error)

Request generator for FindPetById

func NewFindPetsRequest added in v1.1.0

func NewFindPetsRequest(server string, params *FindPetsParams) (*http.Request, error)

Request generator for FindPets

func RegisterHandlers

func RegisterHandlers(router runtime.EchoRouter, si ServerInterface)

Types

type Client added in v1.1.0

type Client struct {
	Server string
	Client http.Client
}

A client which conforms to the OpenAPI3 specification for this service. The server should be fully qualified with shema and server, ie, https://deepmap.com.

func (*Client) AddPet added in v1.1.0

func (c *Client) AddPet(ctx context.Context, body NewPet) (*http.Response, error)

Request for AddPet with JSON body

func (*Client) DeletePet added in v1.1.0

func (c *Client) DeletePet(ctx context.Context, id int64) (*http.Response, error)

Request for DeletePet

func (*Client) FindPetById added in v1.1.0

func (c *Client) FindPetById(ctx context.Context, id int64) (*http.Response, error)

Request for FindPetById

func (*Client) FindPets added in v1.1.0

func (c *Client) FindPets(ctx context.Context, params *FindPetsParams) (*http.Response, error)

Request for FindPets

type Error

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

Type definition for component schema "Error"

type FindPetsParams

type FindPetsParams struct {
	Tags  *[]string `json:"tags,omitempty"`
	Limit *int32    `json:"limit,omitempty"`
}

Parameters object for FindPets

type NewPet

type NewPet struct {
	Name string  `json:"name"`
	Tag  *string `json:"tag,omitempty"`
}

Type definition for component schema "NewPet"

type Pet

type Pet struct {
	// Embedded struct due to allOf(#/components/schemas/NewPet)
	NewPet
	// Embedded fields due to inline allOf schema
	Id int64 `json:"id"`
}

Type definition for component schema "Pet"

type ServerInterface

type ServerInterface interface {
	//  (GET /pets)
	FindPets(ctx echo.Context, params FindPetsParams) error
	//  (POST /pets)
	AddPet(ctx echo.Context) error
	//  (DELETE /pets/{id})
	DeletePet(ctx echo.Context, id int64) error
	//  (GET /pets/{id})
	FindPetById(ctx echo.Context, id int64) error
}

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

func (*ServerInterfaceWrapper) AddPet

func (w *ServerInterfaceWrapper) AddPet(ctx echo.Context) error

Wrapper for AddPet

func (*ServerInterfaceWrapper) DeletePet

func (w *ServerInterfaceWrapper) DeletePet(ctx echo.Context) error

Wrapper for DeletePet

func (*ServerInterfaceWrapper) FindPetById

func (w *ServerInterfaceWrapper) FindPetById(ctx echo.Context) error

Wrapper for FindPetById

func (*ServerInterfaceWrapper) FindPets

func (w *ServerInterfaceWrapper) FindPets(ctx echo.Context) error

Wrapper for FindPets

Jump to

Keyboard shortcuts

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