airports

package
v0.0.0-...-2b9725c Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const AddAirportCreatedCode int = 201

AddAirportCreatedCode is the HTTP code returned for type AddAirportCreated

View Source
const GetAirportsBadRequestCode int = 400

GetAirportsBadRequestCode is the HTTP code returned for type GetAirportsBadRequest

View Source
const GetAirportsOKCode int = 200

GetAirportsOKCode is the HTTP code returned for type GetAirportsOK

Variables

This section is empty.

Functions

This section is empty.

Types

type AddAirport

type AddAirport struct {
	Context *middleware.Context
	Handler AddAirportHandler
}

AddAirport swagger:route POST /airports airports addAirport

Creates an Airport entry. Duplicates are not allowed

func NewAddAirport

func NewAddAirport(ctx *middleware.Context, handler AddAirportHandler) *AddAirport

NewAddAirport creates a new http.Handler for the add airport operation

func (*AddAirport) ServeHTTP

func (o *AddAirport) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type AddAirportCreated

type AddAirportCreated struct {

	/*
	  In: Body
	*/
	Payload *models.Airport `json:"body,omitempty"`
}

AddAirportCreated Created

swagger:response addAirportCreated

func NewAddAirportCreated

func NewAddAirportCreated() *AddAirportCreated

NewAddAirportCreated creates AddAirportCreated with default headers values

func (*AddAirportCreated) SetPayload

func (o *AddAirportCreated) SetPayload(payload *models.Airport)

SetPayload sets the payload to the add airport created response

func (*AddAirportCreated) WithPayload

func (o *AddAirportCreated) WithPayload(payload *models.Airport) *AddAirportCreated

WithPayload adds the payload to the add airport created response

func (*AddAirportCreated) WriteResponse

func (o *AddAirportCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type AddAirportDefault

type AddAirportDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

AddAirportDefault unexpected error

swagger:response addAirportDefault

func NewAddAirportDefault

func NewAddAirportDefault(code int) *AddAirportDefault

NewAddAirportDefault creates AddAirportDefault with default headers values

func (*AddAirportDefault) SetPayload

func (o *AddAirportDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the add airport default response

func (*AddAirportDefault) SetStatusCode

func (o *AddAirportDefault) SetStatusCode(code int)

SetStatusCode sets the status to the add airport default response

func (*AddAirportDefault) WithPayload

func (o *AddAirportDefault) WithPayload(payload *models.Error) *AddAirportDefault

WithPayload adds the payload to the add airport default response

func (*AddAirportDefault) WithStatusCode

func (o *AddAirportDefault) WithStatusCode(code int) *AddAirportDefault

WithStatusCode adds the status to the add airport default response

func (*AddAirportDefault) WriteResponse

func (o *AddAirportDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type AddAirportHandler

type AddAirportHandler interface {
	Handle(AddAirportParams) middleware.Responder
}

AddAirportHandler interface for that can handle valid add airport params

type AddAirportHandlerFunc

type AddAirportHandlerFunc func(AddAirportParams) middleware.Responder

AddAirportHandlerFunc turns a function with the right signature into a add airport handler

func (AddAirportHandlerFunc) Handle

Handle executing the request and returning a response

type AddAirportParams

type AddAirportParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*Airport
	  Required: true
	  In: body
	*/
	Airport *models.Airport
}

AddAirportParams contains all the bound params for the add airport operation typically these are obtained from a http.Request

swagger:parameters addAirport

func NewAddAirportParams

func NewAddAirportParams() AddAirportParams

NewAddAirportParams creates a new AddAirportParams object no default values defined in spec.

func (*AddAirportParams) BindRequest

func (o *AddAirportParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewAddAirportParams() beforehand.

type AddAirportURL

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

AddAirportURL generates an URL for the add airport operation

func (*AddAirportURL) Build

func (o *AddAirportURL) Build() (*url.URL, error)

Build a url path and query string

func (*AddAirportURL) BuildFull

func (o *AddAirportURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*AddAirportURL) Must

func (o *AddAirportURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*AddAirportURL) SetBasePath

func (o *AddAirportURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*AddAirportURL) String

func (o *AddAirportURL) String() string

String returns the string representation of the path with query string

func (*AddAirportURL) StringFull

func (o *AddAirportURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*AddAirportURL) WithBasePath

func (o *AddAirportURL) WithBasePath(bp string) *AddAirportURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type GetAirports

type GetAirports struct {
	Context *middleware.Context
	Handler GetAirportsHandler
}

GetAirports swagger:route GET /airports airports getAirports

GetAirports get airports API

func NewGetAirports

func NewGetAirports(ctx *middleware.Context, handler GetAirportsHandler) *GetAirports

NewGetAirports creates a new http.Handler for the get airports operation

func (*GetAirports) ServeHTTP

func (o *GetAirports) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetAirportsBadRequest

type GetAirportsBadRequest struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
}

GetAirportsBadRequest generic error response

swagger:response getAirportsBadRequest

func NewGetAirportsBadRequest

func NewGetAirportsBadRequest() *GetAirportsBadRequest

NewGetAirportsBadRequest creates GetAirportsBadRequest with default headers values

func (*GetAirportsBadRequest) SetPayload

func (o *GetAirportsBadRequest) SetPayload(payload *models.Error)

SetPayload sets the payload to the get airports bad request response

func (*GetAirportsBadRequest) WithPayload

func (o *GetAirportsBadRequest) WithPayload(payload *models.Error) *GetAirportsBadRequest

WithPayload adds the payload to the get airports bad request response

func (*GetAirportsBadRequest) WriteResponse

func (o *GetAirportsBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetAirportsDefault

type GetAirportsDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

GetAirportsDefault generic error response

swagger:response getAirportsDefault

func NewGetAirportsDefault

func NewGetAirportsDefault(code int) *GetAirportsDefault

NewGetAirportsDefault creates GetAirportsDefault with default headers values

func (*GetAirportsDefault) SetPayload

func (o *GetAirportsDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the get airports default response

func (*GetAirportsDefault) SetStatusCode

func (o *GetAirportsDefault) SetStatusCode(code int)

SetStatusCode sets the status to the get airports default response

func (*GetAirportsDefault) WithPayload

func (o *GetAirportsDefault) WithPayload(payload *models.Error) *GetAirportsDefault

WithPayload adds the payload to the get airports default response

func (*GetAirportsDefault) WithStatusCode

func (o *GetAirportsDefault) WithStatusCode(code int) *GetAirportsDefault

WithStatusCode adds the status to the get airports default response

func (*GetAirportsDefault) WriteResponse

func (o *GetAirportsDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetAirportsHandler

type GetAirportsHandler interface {
	Handle(GetAirportsParams) middleware.Responder
}

GetAirportsHandler interface for that can handle valid get airports params

type GetAirportsHandlerFunc

type GetAirportsHandlerFunc func(GetAirportsParams) middleware.Responder

GetAirportsHandlerFunc turns a function with the right signature into a get airports handler

func (GetAirportsHandlerFunc) Handle

Handle executing the request and returning a response

type GetAirportsOK

type GetAirportsOK struct {

	/*
	  In: Body
	*/
	Payload []*models.Airport `json:"body,omitempty"`
}

GetAirportsOK list of airports

swagger:response getAirportsOK

func NewGetAirportsOK

func NewGetAirportsOK() *GetAirportsOK

NewGetAirportsOK creates GetAirportsOK with default headers values

func (*GetAirportsOK) SetPayload

func (o *GetAirportsOK) SetPayload(payload []*models.Airport)

SetPayload sets the payload to the get airports o k response

func (*GetAirportsOK) WithPayload

func (o *GetAirportsOK) WithPayload(payload []*models.Airport) *GetAirportsOK

WithPayload adds the payload to the get airports o k response

func (*GetAirportsOK) WriteResponse

func (o *GetAirportsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetAirportsParams

type GetAirportsParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`
}

GetAirportsParams contains all the bound params for the get airports operation typically these are obtained from a http.Request

swagger:parameters GetAirports

func NewGetAirportsParams

func NewGetAirportsParams() GetAirportsParams

NewGetAirportsParams creates a new GetAirportsParams object no default values defined in spec.

func (*GetAirportsParams) BindRequest

func (o *GetAirportsParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetAirportsParams() beforehand.

type GetAirportsURL

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

GetAirportsURL generates an URL for the get airports operation

func (*GetAirportsURL) Build

func (o *GetAirportsURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetAirportsURL) BuildFull

func (o *GetAirportsURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetAirportsURL) Must

func (o *GetAirportsURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetAirportsURL) SetBasePath

func (o *GetAirportsURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetAirportsURL) String

func (o *GetAirportsURL) String() string

String returns the string representation of the path with query string

func (*GetAirportsURL) StringFull

func (o *GetAirportsURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetAirportsURL) WithBasePath

func (o *GetAirportsURL) WithBasePath(bp string) *GetAirportsURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Jump to

Keyboard shortcuts

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