airlines

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 AddAirlineCreatedCode int = 201

AddAirlineCreatedCode is the HTTP code returned for type AddAirlineCreated

View Source
const GetAirlinesBadRequestCode int = 400

GetAirlinesBadRequestCode is the HTTP code returned for type GetAirlinesBadRequest

View Source
const GetAirlinesOKCode int = 200

GetAirlinesOKCode is the HTTP code returned for type GetAirlinesOK

Variables

This section is empty.

Functions

This section is empty.

Types

type AddAirline

type AddAirline struct {
	Context *middleware.Context
	Handler AddAirlineHandler
}

AddAirline swagger:route POST /airlines airlines addAirline

Creates a new airline. Duplicates are not allowed

func NewAddAirline

func NewAddAirline(ctx *middleware.Context, handler AddAirlineHandler) *AddAirline

NewAddAirline creates a new http.Handler for the add airline operation

func (*AddAirline) ServeHTTP

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

type AddAirlineCreated

type AddAirlineCreated struct {

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

AddAirlineCreated Created

swagger:response addAirlineCreated

func NewAddAirlineCreated

func NewAddAirlineCreated() *AddAirlineCreated

NewAddAirlineCreated creates AddAirlineCreated with default headers values

func (*AddAirlineCreated) SetPayload

func (o *AddAirlineCreated) SetPayload(payload *models.Airline)

SetPayload sets the payload to the add airline created response

func (*AddAirlineCreated) WithPayload

func (o *AddAirlineCreated) WithPayload(payload *models.Airline) *AddAirlineCreated

WithPayload adds the payload to the add airline created response

func (*AddAirlineCreated) WriteResponse

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

WriteResponse to the client

type AddAirlineDefault

type AddAirlineDefault struct {

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

AddAirlineDefault unexpected error

swagger:response addAirlineDefault

func NewAddAirlineDefault

func NewAddAirlineDefault(code int) *AddAirlineDefault

NewAddAirlineDefault creates AddAirlineDefault with default headers values

func (*AddAirlineDefault) SetPayload

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

SetPayload sets the payload to the add airline default response

func (*AddAirlineDefault) SetStatusCode

func (o *AddAirlineDefault) SetStatusCode(code int)

SetStatusCode sets the status to the add airline default response

func (*AddAirlineDefault) WithPayload

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

WithPayload adds the payload to the add airline default response

func (*AddAirlineDefault) WithStatusCode

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

WithStatusCode adds the status to the add airline default response

func (*AddAirlineDefault) WriteResponse

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

WriteResponse to the client

type AddAirlineHandler

type AddAirlineHandler interface {
	Handle(AddAirlineParams) middleware.Responder
}

AddAirlineHandler interface for that can handle valid add airline params

type AddAirlineHandlerFunc

type AddAirlineHandlerFunc func(AddAirlineParams) middleware.Responder

AddAirlineHandlerFunc turns a function with the right signature into a add airline handler

func (AddAirlineHandlerFunc) Handle

Handle executing the request and returning a response

type AddAirlineParams

type AddAirlineParams struct {

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

	/*Airline"
	  Required: true
	  In: body
	*/
	Airline *models.Airline
}

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

swagger:parameters addAirline

func NewAddAirlineParams

func NewAddAirlineParams() AddAirlineParams

NewAddAirlineParams creates a new AddAirlineParams object no default values defined in spec.

func (*AddAirlineParams) BindRequest

func (o *AddAirlineParams) 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 NewAddAirlineParams() beforehand.

type AddAirlineURL

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

AddAirlineURL generates an URL for the add airline operation

func (*AddAirlineURL) Build

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

Build a url path and query string

func (*AddAirlineURL) BuildFull

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

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

func (*AddAirlineURL) Must

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

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

func (*AddAirlineURL) SetBasePath

func (o *AddAirlineURL) 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 (*AddAirlineURL) String

func (o *AddAirlineURL) String() string

String returns the string representation of the path with query string

func (*AddAirlineURL) StringFull

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

StringFull returns the string representation of a complete url

func (*AddAirlineURL) WithBasePath

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

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 GetAirlines

type GetAirlines struct {
	Context *middleware.Context
	Handler GetAirlinesHandler
}

GetAirlines swagger:route GET /airlines airlines getAirlines

GetAirlines get airlines API

func NewGetAirlines

func NewGetAirlines(ctx *middleware.Context, handler GetAirlinesHandler) *GetAirlines

NewGetAirlines creates a new http.Handler for the get airlines operation

func (*GetAirlines) ServeHTTP

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

type GetAirlinesBadRequest

type GetAirlinesBadRequest struct {

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

GetAirlinesBadRequest generic error response

swagger:response getAirlinesBadRequest

func NewGetAirlinesBadRequest

func NewGetAirlinesBadRequest() *GetAirlinesBadRequest

NewGetAirlinesBadRequest creates GetAirlinesBadRequest with default headers values

func (*GetAirlinesBadRequest) SetPayload

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

SetPayload sets the payload to the get airlines bad request response

func (*GetAirlinesBadRequest) WithPayload

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

WithPayload adds the payload to the get airlines bad request response

func (*GetAirlinesBadRequest) WriteResponse

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

WriteResponse to the client

type GetAirlinesDefault

type GetAirlinesDefault struct {

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

GetAirlinesDefault generic error response

swagger:response getAirlinesDefault

func NewGetAirlinesDefault

func NewGetAirlinesDefault(code int) *GetAirlinesDefault

NewGetAirlinesDefault creates GetAirlinesDefault with default headers values

func (*GetAirlinesDefault) SetPayload

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

SetPayload sets the payload to the get airlines default response

func (*GetAirlinesDefault) SetStatusCode

func (o *GetAirlinesDefault) SetStatusCode(code int)

SetStatusCode sets the status to the get airlines default response

func (*GetAirlinesDefault) WithPayload

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

WithPayload adds the payload to the get airlines default response

func (*GetAirlinesDefault) WithStatusCode

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

WithStatusCode adds the status to the get airlines default response

func (*GetAirlinesDefault) WriteResponse

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

WriteResponse to the client

type GetAirlinesHandler

type GetAirlinesHandler interface {
	Handle(GetAirlinesParams) middleware.Responder
}

GetAirlinesHandler interface for that can handle valid get airlines params

type GetAirlinesHandlerFunc

type GetAirlinesHandlerFunc func(GetAirlinesParams) middleware.Responder

GetAirlinesHandlerFunc turns a function with the right signature into a get airlines handler

func (GetAirlinesHandlerFunc) Handle

Handle executing the request and returning a response

type GetAirlinesOK

type GetAirlinesOK struct {

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

GetAirlinesOK list of airlines

swagger:response getAirlinesOK

func NewGetAirlinesOK

func NewGetAirlinesOK() *GetAirlinesOK

NewGetAirlinesOK creates GetAirlinesOK with default headers values

func (*GetAirlinesOK) SetPayload

func (o *GetAirlinesOK) SetPayload(payload []*models.Airline)

SetPayload sets the payload to the get airlines o k response

func (*GetAirlinesOK) WithPayload

func (o *GetAirlinesOK) WithPayload(payload []*models.Airline) *GetAirlinesOK

WithPayload adds the payload to the get airlines o k response

func (*GetAirlinesOK) WriteResponse

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

WriteResponse to the client

type GetAirlinesParams

type GetAirlinesParams struct {

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

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

swagger:parameters GetAirlines

func NewGetAirlinesParams

func NewGetAirlinesParams() GetAirlinesParams

NewGetAirlinesParams creates a new GetAirlinesParams object no default values defined in spec.

func (*GetAirlinesParams) BindRequest

func (o *GetAirlinesParams) 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 NewGetAirlinesParams() beforehand.

type GetAirlinesURL

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

GetAirlinesURL generates an URL for the get airlines operation

func (*GetAirlinesURL) Build

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

Build a url path and query string

func (*GetAirlinesURL) BuildFull

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

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

func (*GetAirlinesURL) Must

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

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

func (*GetAirlinesURL) SetBasePath

func (o *GetAirlinesURL) 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 (*GetAirlinesURL) String

func (o *GetAirlinesURL) String() string

String returns the string representation of the path with query string

func (*GetAirlinesURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetAirlinesURL) WithBasePath

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

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