operations

package
v0.0.0-...-489883c Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2017 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetLines

type GetLines struct {
	Context *middleware.Context
	Handler GetLinesHandler
}

GetLines swagger:route GET /lines getLines

List of lines

List of all the lines TODO supports pagination

func NewGetLines

func NewGetLines(ctx *middleware.Context, handler GetLinesHandler) *GetLines

NewGetLines creates a new http.Handler for the get lines operation

func (*GetLines) ServeHTTP

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

type GetLinesHandler

type GetLinesHandler interface {
	Handle(GetLinesParams) middleware.Responder
}

GetLinesHandler interface for that can handle valid get lines params

type GetLinesHandlerFunc

type GetLinesHandlerFunc func(GetLinesParams) middleware.Responder

GetLinesHandlerFunc turns a function with the right signature into a get lines handler

func (GetLinesHandlerFunc) Handle

Handle executing the request and returning a response

type GetLinesOK

type GetLinesOK struct {

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

GetLinesOK An array of stations

swagger:response getLinesOK

func NewGetLinesOK

func NewGetLinesOK() *GetLinesOK

NewGetLinesOK creates GetLinesOK with default headers values

func (*GetLinesOK) SetPayload

func (o *GetLinesOK) SetPayload(payload []*models.Station)

SetPayload sets the payload to the get lines o k response

func (*GetLinesOK) WithPayload

func (o *GetLinesOK) WithPayload(payload []*models.Station) *GetLinesOK

WithPayload adds the payload to the get lines o k response

func (*GetLinesOK) WriteResponse

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

WriteResponse to the client

type GetLinesParams

type GetLinesParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request
}

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

swagger:parameters GetLines

func NewGetLinesParams

func NewGetLinesParams() GetLinesParams

NewGetLinesParams creates a new GetLinesParams object with the default values initialized.

func (*GetLinesParams) BindRequest

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

type GetLinesURL

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

GetLinesURL generates an URL for the get lines operation

func (*GetLinesURL) Build

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

Build a url path and query string

func (*GetLinesURL) BuildFull

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

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

func (*GetLinesURL) Must

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

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

func (*GetLinesURL) SetBasePath

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

func (o *GetLinesURL) String() string

String returns the string representation of the path with query string

func (*GetLinesURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetLinesURL) WithBasePath

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

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 GetStations

type GetStations struct {
	Context *middleware.Context
	Handler GetStationsHandler
}

GetStations swagger:route GET /stations getStations

List of stations

List of all the stations TODO Supports pagination

func NewGetStations

func NewGetStations(ctx *middleware.Context, handler GetStationsHandler) *GetStations

NewGetStations creates a new http.Handler for the get stations operation

func (*GetStations) ServeHTTP

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

type GetStationsDefault

type GetStationsDefault struct {

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

GetStationsDefault Unexpected error

swagger:response getStationsDefault

func NewGetStationsDefault

func NewGetStationsDefault(code int) *GetStationsDefault

NewGetStationsDefault creates GetStationsDefault with default headers values

func (*GetStationsDefault) SetPayload

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

SetPayload sets the payload to the get stations default response

func (*GetStationsDefault) SetStatusCode

func (o *GetStationsDefault) SetStatusCode(code int)

SetStatusCode sets the status to the get stations default response

func (*GetStationsDefault) WithPayload

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

WithPayload adds the payload to the get stations default response

func (*GetStationsDefault) WithStatusCode

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

WithStatusCode adds the status to the get stations default response

func (*GetStationsDefault) WriteResponse

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

WriteResponse to the client

type GetStationsHandler

type GetStationsHandler interface {
	Handle(GetStationsParams) middleware.Responder
}

GetStationsHandler interface for that can handle valid get stations params

type GetStationsHandlerFunc

type GetStationsHandlerFunc func(GetStationsParams) middleware.Responder

GetStationsHandlerFunc turns a function with the right signature into a get stations handler

func (GetStationsHandlerFunc) Handle

Handle executing the request and returning a response

type GetStationsOK

type GetStationsOK struct {

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

GetStationsOK An array of stations

swagger:response getStationsOK

func NewGetStationsOK

func NewGetStationsOK() *GetStationsOK

NewGetStationsOK creates GetStationsOK with default headers values

func (*GetStationsOK) SetPayload

func (o *GetStationsOK) SetPayload(payload []*models.Station)

SetPayload sets the payload to the get stations o k response

func (*GetStationsOK) WithPayload

func (o *GetStationsOK) WithPayload(payload []*models.Station) *GetStationsOK

WithPayload adds the payload to the get stations o k response

func (*GetStationsOK) WriteResponse

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

WriteResponse to the client

type GetStationsParams

type GetStationsParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request
}

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

swagger:parameters GetStations

func NewGetStationsParams

func NewGetStationsParams() GetStationsParams

NewGetStationsParams creates a new GetStationsParams object with the default values initialized.

func (*GetStationsParams) BindRequest

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

type GetStationsURL

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

GetStationsURL generates an URL for the get stations operation

func (*GetStationsURL) Build

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

Build a url path and query string

func (*GetStationsURL) BuildFull

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

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

func (*GetStationsURL) Must

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

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

func (*GetStationsURL) SetBasePath

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

func (o *GetStationsURL) String() string

String returns the string representation of the path with query string

func (*GetStationsURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetStationsURL) WithBasePath

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

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 PostLines

type PostLines struct {
	Context *middleware.Context
	Handler PostLinesHandler
}

PostLines swagger:route POST /lines postLines

Create a line

func NewPostLines

func NewPostLines(ctx *middleware.Context, handler PostLinesHandler) *PostLines

NewPostLines creates a new http.Handler for the post lines operation

func (*PostLines) ServeHTTP

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

type PostLinesDefault

type PostLinesDefault struct {

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

PostLinesDefault Unexpected error

swagger:response postLinesDefault

func NewPostLinesDefault

func NewPostLinesDefault(code int) *PostLinesDefault

NewPostLinesDefault creates PostLinesDefault with default headers values

func (*PostLinesDefault) SetPayload

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

SetPayload sets the payload to the post lines default response

func (*PostLinesDefault) SetStatusCode

func (o *PostLinesDefault) SetStatusCode(code int)

SetStatusCode sets the status to the post lines default response

func (*PostLinesDefault) WithPayload

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

WithPayload adds the payload to the post lines default response

func (*PostLinesDefault) WithStatusCode

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

WithStatusCode adds the status to the post lines default response

func (*PostLinesDefault) WriteResponse

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

WriteResponse to the client

type PostLinesHandler

type PostLinesHandler interface {
	Handle(PostLinesParams) middleware.Responder
}

PostLinesHandler interface for that can handle valid post lines params

type PostLinesHandlerFunc

type PostLinesHandlerFunc func(PostLinesParams) middleware.Responder

PostLinesHandlerFunc turns a function with the right signature into a post lines handler

func (PostLinesHandlerFunc) Handle

Handle executing the request and returning a response

type PostLinesNoContent

type PostLinesNoContent struct {
}

PostLinesNoContent Succesfully created a line

swagger:response postLinesNoContent

func NewPostLinesNoContent

func NewPostLinesNoContent() *PostLinesNoContent

NewPostLinesNoContent creates PostLinesNoContent with default headers values

func (*PostLinesNoContent) WriteResponse

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

WriteResponse to the client

type PostLinesParams

type PostLinesParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request

	/*The line to create.
	  Required: true
	  In: body
	*/
	Line *models.Line
}

PostLinesParams contains all the bound params for the post lines operation typically these are obtained from a http.Request

swagger:parameters PostLines

func NewPostLinesParams

func NewPostLinesParams() PostLinesParams

NewPostLinesParams creates a new PostLinesParams object with the default values initialized.

func (*PostLinesParams) BindRequest

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

type PostLinesURL

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

PostLinesURL generates an URL for the post lines operation

func (*PostLinesURL) Build

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

Build a url path and query string

func (*PostLinesURL) BuildFull

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

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

func (*PostLinesURL) Must

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

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

func (*PostLinesURL) SetBasePath

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

func (o *PostLinesURL) String() string

String returns the string representation of the path with query string

func (*PostLinesURL) StringFull

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

StringFull returns the string representation of a complete url

func (*PostLinesURL) WithBasePath

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

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 PostStations

type PostStations struct {
	Context *middleware.Context
	Handler PostStationsHandler
}

PostStations swagger:route POST /stations postStations

Create a station

Create a new station TODO

func NewPostStations

func NewPostStations(ctx *middleware.Context, handler PostStationsHandler) *PostStations

NewPostStations creates a new http.Handler for the post stations operation

func (*PostStations) ServeHTTP

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

type PostStationsDefault

type PostStationsDefault struct {

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

PostStationsDefault Unexpected error

swagger:response postStationsDefault

func NewPostStationsDefault

func NewPostStationsDefault(code int) *PostStationsDefault

NewPostStationsDefault creates PostStationsDefault with default headers values

func (*PostStationsDefault) SetPayload

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

SetPayload sets the payload to the post stations default response

func (*PostStationsDefault) SetStatusCode

func (o *PostStationsDefault) SetStatusCode(code int)

SetStatusCode sets the status to the post stations default response

func (*PostStationsDefault) WithPayload

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

WithPayload adds the payload to the post stations default response

func (*PostStationsDefault) WithStatusCode

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

WithStatusCode adds the status to the post stations default response

func (*PostStationsDefault) WriteResponse

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

WriteResponse to the client

type PostStationsHandler

type PostStationsHandler interface {
	Handle(PostStationsParams) middleware.Responder
}

PostStationsHandler interface for that can handle valid post stations params

type PostStationsHandlerFunc

type PostStationsHandlerFunc func(PostStationsParams) middleware.Responder

PostStationsHandlerFunc turns a function with the right signature into a post stations handler

func (PostStationsHandlerFunc) Handle

Handle executing the request and returning a response

type PostStationsNoContent

type PostStationsNoContent struct {
}

PostStationsNoContent Succesfully created a station

swagger:response postStationsNoContent

func NewPostStationsNoContent

func NewPostStationsNoContent() *PostStationsNoContent

NewPostStationsNoContent creates PostStationsNoContent with default headers values

func (*PostStationsNoContent) WriteResponse

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

WriteResponse to the client

type PostStationsParams

type PostStationsParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request

	/*The station to create.
	  Required: true
	  In: body
	*/
	Station *models.Station
}

PostStationsParams contains all the bound params for the post stations operation typically these are obtained from a http.Request

swagger:parameters PostStations

func NewPostStationsParams

func NewPostStationsParams() PostStationsParams

NewPostStationsParams creates a new PostStationsParams object with the default values initialized.

func (*PostStationsParams) BindRequest

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

type PostStationsURL

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

PostStationsURL generates an URL for the post stations operation

func (*PostStationsURL) Build

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

Build a url path and query string

func (*PostStationsURL) BuildFull

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

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

func (*PostStationsURL) Must

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

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

func (*PostStationsURL) SetBasePath

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

func (o *PostStationsURL) String() string

String returns the string representation of the path with query string

func (*PostStationsURL) StringFull

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

StringFull returns the string representation of a complete url

func (*PostStationsURL) WithBasePath

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

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 SofiaTrafficAPI

type SofiaTrafficAPI struct {
	Middleware func(middleware.Builder) http.Handler
	// JSONConsumer registers a consumer for a "application/json" mime type
	JSONConsumer runtime.Consumer

	// JSONProducer registers a producer for a "application/json" mime type
	JSONProducer runtime.Producer

	// GetLinesHandler sets the operation handler for the get lines operation
	GetLinesHandler GetLinesHandler
	// GetStationsHandler sets the operation handler for the get stations operation
	GetStationsHandler GetStationsHandler
	// PostLinesHandler sets the operation handler for the post lines operation
	PostLinesHandler PostLinesHandler
	// PostStationsHandler sets the operation handler for the post stations operation
	PostStationsHandler PostStationsHandler

	// ServeError is called when an error is received, there is a default handler
	// but you can set your own with this
	ServeError func(http.ResponseWriter, *http.Request, error)

	// ServerShutdown is called when the HTTP(S) server is shut down and done
	// handling all active connections and does not accept connections any more
	ServerShutdown func()

	// Custom command line argument groups with their descriptions
	CommandLineOptionsGroups []swag.CommandLineOptionsGroup

	// User defined logger function.
	Logger func(string, ...interface{})
	// contains filtered or unexported fields
}

SofiaTrafficAPI A better API for Sofia Traffic service

func NewSofiaTrafficAPI

func NewSofiaTrafficAPI(spec *loads.Document) *SofiaTrafficAPI

NewSofiaTrafficAPI creates a new SofiaTraffic instance

func (*SofiaTrafficAPI) AuthenticatorsFor

func (o *SofiaTrafficAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*SofiaTrafficAPI) ConsumersFor

func (o *SofiaTrafficAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer

ConsumersFor gets the consumers for the specified media types

func (*SofiaTrafficAPI) Context

func (o *SofiaTrafficAPI) Context() *middleware.Context

Context returns the middleware context for the sofia traffic API

func (*SofiaTrafficAPI) DefaultConsumes

func (o *SofiaTrafficAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*SofiaTrafficAPI) DefaultProduces

func (o *SofiaTrafficAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*SofiaTrafficAPI) Formats

func (o *SofiaTrafficAPI) Formats() strfmt.Registry

Formats returns the registered string formats

func (*SofiaTrafficAPI) HandlerFor

func (o *SofiaTrafficAPI) HandlerFor(method, path string) (http.Handler, bool)

HandlerFor gets a http.Handler for the provided operation method and path

func (*SofiaTrafficAPI) Init

func (o *SofiaTrafficAPI) Init()

Init allows you to just initialize the handler cache, you can then recompose the middelware as you see fit

func (*SofiaTrafficAPI) ProducersFor

func (o *SofiaTrafficAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer

ProducersFor gets the producers for the specified media types

func (*SofiaTrafficAPI) RegisterFormat

func (o *SofiaTrafficAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)

RegisterFormat registers a custom format validator

func (*SofiaTrafficAPI) Serve

func (o *SofiaTrafficAPI) Serve(builder middleware.Builder) http.Handler

Serve creates a http handler to serve the API over HTTP can be used directly in http.ListenAndServe(":8000", api.Serve(nil))

func (*SofiaTrafficAPI) ServeErrorFor

func (o *SofiaTrafficAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)

ServeErrorFor gets a error handler for a given operation id

func (*SofiaTrafficAPI) SetDefaultConsumes

func (o *SofiaTrafficAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*SofiaTrafficAPI) SetDefaultProduces

func (o *SofiaTrafficAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*SofiaTrafficAPI) SetSpec

func (o *SofiaTrafficAPI) SetSpec(spec *loads.Document)

SetSpec sets a spec that will be served for the clients.

func (*SofiaTrafficAPI) Validate

func (o *SofiaTrafficAPI) Validate() error

Validate validates the registrations in the SofiaTrafficAPI

Jump to

Keyboard shortcuts

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