operations

package
v0.0.0-...-d881226 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2016 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddEvent

type AddEvent struct {
	Context *middleware.Context
	Params  AddEventParams
	Handler AddEventHandler
}

AddEvent swagger:route PUT /events/{id} addEvent

イベントの作成

func NewAddEvent

func NewAddEvent(ctx *middleware.Context, handler AddEventHandler) *AddEvent

NewAddEvent creates a new http.Handler for the add event operation

func (*AddEvent) ServeHTTP

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

type AddEventBody

type AddEventBody struct {

	/* 最大チケット数

	Required: true
	*/
	MaxTicket int32 `json:"max_ticket,omitempty"`
}

AddEventBody AddEventBody add event body

swagger:model AddEventBody

func (*AddEventBody) Validate

func (o *AddEventBody) Validate(formats strfmt.Registry) error

Validate validates this add event body

type AddEventConflict

type AddEventConflict struct {
}

AddEventConflict Conflict(作成済み)

swagger:response addEventConflict

func NewAddEventConflict

func NewAddEventConflict() *AddEventConflict

NewAddEventConflict creates AddEventConflict with default headers values

func (*AddEventConflict) WriteResponse

func (o *AddEventConflict) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type AddEventHandler

type AddEventHandler interface {
	Handle(AddEventParams) middleware.Responder
}

AddEventHandler interface for that can handle valid add event params

type AddEventHandlerFunc

type AddEventHandlerFunc func(AddEventParams) middleware.Responder

AddEventHandlerFunc turns a function with the right signature into a add event handler

func (AddEventHandlerFunc) Handle

Handle executing the request and returning a response

type AddEventInternalServerError

type AddEventInternalServerError struct {

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

AddEventInternalServerError unexpected error

swagger:response addEventInternalServerError

func NewAddEventInternalServerError

func NewAddEventInternalServerError() *AddEventInternalServerError

NewAddEventInternalServerError creates AddEventInternalServerError with default headers values

func (*AddEventInternalServerError) WithPayload

WithPayload adds the payload to the add event internal server error response

func (*AddEventInternalServerError) WriteResponse

func (o *AddEventInternalServerError) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type AddEventOK

type AddEventOK struct {

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

AddEventOK 作成成功

swagger:response addEventOK

func NewAddEventOK

func NewAddEventOK() *AddEventOK

NewAddEventOK creates AddEventOK with default headers values

func (*AddEventOK) WithPayload

func (o *AddEventOK) WithPayload(payload *models.Event) *AddEventOK

WithPayload adds the payload to the add event o k response

func (*AddEventOK) WriteResponse

func (o *AddEventOK) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type AddEventParams

type AddEventParams struct {
	/*イベントID
	  Required: true
	  In: path
	*/
	ID string
	/*イベントを追加
	  In: body
	*/
	Options AddEventBody
}

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

swagger:parameters addEvent

func NewAddEventParams

func NewAddEventParams() AddEventParams

NewAddEventParams creates a new AddEventParams object with the default values initialized.

func (*AddEventParams) BindRequest

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

type DeleteEvent struct {
	Context *middleware.Context
	Params  DeleteEventParams
	Handler DeleteEventHandler
}

DeleteEvent swagger:route DELETE /events/{id} deleteEvent

イベント削除

func NewDeleteEvent

func NewDeleteEvent(ctx *middleware.Context, handler DeleteEventHandler) *DeleteEvent

NewDeleteEvent creates a new http.Handler for the delete event operation

func (*DeleteEvent) ServeHTTP

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

type DeleteEventHandler

type DeleteEventHandler interface {
	Handle(DeleteEventParams) middleware.Responder
}

DeleteEventHandler interface for that can handle valid delete event params

type DeleteEventHandlerFunc

type DeleteEventHandlerFunc func(DeleteEventParams) middleware.Responder

DeleteEventHandlerFunc turns a function with the right signature into a delete event handler

func (DeleteEventHandlerFunc) Handle

Handle executing the request and returning a response

type DeleteEventInternalServerError

type DeleteEventInternalServerError struct {

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

DeleteEventInternalServerError unexpected error

swagger:response deleteEventInternalServerError

func NewDeleteEventInternalServerError

func NewDeleteEventInternalServerError() *DeleteEventInternalServerError

NewDeleteEventInternalServerError creates DeleteEventInternalServerError with default headers values

func (*DeleteEventInternalServerError) WithPayload

WithPayload adds the payload to the delete event internal server error response

func (*DeleteEventInternalServerError) WriteResponse

func (o *DeleteEventInternalServerError) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type DeleteEventNoContent

type DeleteEventNoContent struct {
}

DeleteEventNoContent イベント削除

swagger:response deleteEventNoContent

func NewDeleteEventNoContent

func NewDeleteEventNoContent() *DeleteEventNoContent

NewDeleteEventNoContent creates DeleteEventNoContent with default headers values

func (*DeleteEventNoContent) WriteResponse

func (o *DeleteEventNoContent) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type DeleteEventParams

type DeleteEventParams struct {
	/*イベントID
	  Required: true
	  In: path
	*/
	ID string
}

DeleteEventParams contains all the bound params for the delete event operation typically these are obtained from a http.Request

swagger:parameters deleteEvent

func NewDeleteEventParams

func NewDeleteEventParams() DeleteEventParams

NewDeleteEventParams creates a new DeleteEventParams object with the default values initialized.

func (*DeleteEventParams) BindRequest

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

type FastpassAPI struct {

	// JSONConsumer registers a consumer for a "application/json" mime type
	JSONConsumer httpkit.Consumer

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

	// AddEventHandler sets the operation handler for the add event operation
	AddEventHandler AddEventHandler
	// DeleteEventHandler sets the operation handler for the delete event operation
	DeleteEventHandler DeleteEventHandler
	// GetTicketHandler sets the operation handler for the get ticket operation
	GetTicketHandler GetTicketHandler
	// ListEventsHandler sets the operation handler for the list events operation
	ListEventsHandler ListEventsHandler
	// TicketingHandler sets the operation handler for the ticketing operation
	TicketingHandler TicketingHandler

	// 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
	// contains filtered or unexported fields
}

FastpassAPI fastpass発券機

func NewFastpassAPI

func NewFastpassAPI(spec *spec.Document) *FastpassAPI

NewFastpassAPI creates a new Fastpass instance

func (*FastpassAPI) AuthenticatorsFor

func (o *FastpassAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]httpkit.Authenticator

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*FastpassAPI) ConsumersFor

func (o *FastpassAPI) ConsumersFor(mediaTypes []string) map[string]httpkit.Consumer

ConsumersFor gets the consumers for the specified media types

func (*FastpassAPI) DefaultConsumes

func (o *FastpassAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*FastpassAPI) DefaultProduces

func (o *FastpassAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*FastpassAPI) Formats

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

Formats returns the registered string formats

func (*FastpassAPI) HandlerFor

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

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

func (*FastpassAPI) ProducersFor

func (o *FastpassAPI) ProducersFor(mediaTypes []string) map[string]httpkit.Producer

ProducersFor gets the producers for the specified media types

func (*FastpassAPI) RegisterFormat

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

RegisterFormat registers a custom format validator

func (*FastpassAPI) Serve

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

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

ServeErrorFor gets a error handler for a given operation id

func (*FastpassAPI) SetDefaultConsumes

func (o *FastpassAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*FastpassAPI) SetDefaultProduces

func (o *FastpassAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*FastpassAPI) Validate

func (o *FastpassAPI) Validate() error

Validate validates the registrations in the FastpassAPI

type GetTicket

type GetTicket struct {
	Context *middleware.Context
	Params  GetTicketParams
	Handler GetTicketHandler
}

GetTicket swagger:route GET /events/{id}/tickets/{uid} getTicket

チケット確認

func NewGetTicket

func NewGetTicket(ctx *middleware.Context, handler GetTicketHandler) *GetTicket

NewGetTicket creates a new http.Handler for the get ticket operation

func (*GetTicket) ServeHTTP

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

type GetTicketHandler

type GetTicketHandler interface {
	Handle(GetTicketParams) middleware.Responder
}

GetTicketHandler interface for that can handle valid get ticket params

type GetTicketHandlerFunc

type GetTicketHandlerFunc func(GetTicketParams) middleware.Responder

GetTicketHandlerFunc turns a function with the right signature into a get ticket handler

func (GetTicketHandlerFunc) Handle

Handle executing the request and returning a response

type GetTicketInternalServerError

type GetTicketInternalServerError struct {

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

GetTicketInternalServerError unexpected error

swagger:response getTicketInternalServerError

func NewGetTicketInternalServerError

func NewGetTicketInternalServerError() *GetTicketInternalServerError

NewGetTicketInternalServerError creates GetTicketInternalServerError with default headers values

func (*GetTicketInternalServerError) WithPayload

WithPayload adds the payload to the get ticket internal server error response

func (*GetTicketInternalServerError) WriteResponse

func (o *GetTicketInternalServerError) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type GetTicketNotFound

type GetTicketNotFound struct {
}

GetTicketNotFound 発券されていない

swagger:response getTicketNotFound

func NewGetTicketNotFound

func NewGetTicketNotFound() *GetTicketNotFound

NewGetTicketNotFound creates GetTicketNotFound with default headers values

func (*GetTicketNotFound) WriteResponse

func (o *GetTicketNotFound) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type GetTicketOK

type GetTicketOK struct {

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

GetTicketOK 発券されている

swagger:response getTicketOK

func NewGetTicketOK

func NewGetTicketOK() *GetTicketOK

NewGetTicketOK creates GetTicketOK with default headers values

func (*GetTicketOK) WithPayload

func (o *GetTicketOK) WithPayload(payload *models.Ticket) *GetTicketOK

WithPayload adds the payload to the get ticket o k response

func (*GetTicketOK) WriteResponse

func (o *GetTicketOK) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type GetTicketParams

type GetTicketParams struct {
	/*イベントid
	  Required: true
	  In: path
	*/
	ID string
	/*uid
	  Required: true
	  In: path
	*/
	UID string
}

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

swagger:parameters getTicket

func NewGetTicketParams

func NewGetTicketParams() GetTicketParams

NewGetTicketParams creates a new GetTicketParams object with the default values initialized.

func (*GetTicketParams) BindRequest

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

type ListEvents struct {
	Context *middleware.Context
	Params  ListEventsParams
	Handler ListEventsHandler
}

ListEvents swagger:route GET /events listEvents

イベント一覧

func NewListEvents

func NewListEvents(ctx *middleware.Context, handler ListEventsHandler) *ListEvents

NewListEvents creates a new http.Handler for the list events operation

func (*ListEvents) ServeHTTP

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

type ListEventsHandler

type ListEventsHandler interface {
	Handle(ListEventsParams) middleware.Responder
}

ListEventsHandler interface for that can handle valid list events params

type ListEventsHandlerFunc

type ListEventsHandlerFunc func(ListEventsParams) middleware.Responder

ListEventsHandlerFunc turns a function with the right signature into a list events handler

func (ListEventsHandlerFunc) Handle

Handle executing the request and returning a response

type ListEventsInternalServerError

type ListEventsInternalServerError struct {

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

ListEventsInternalServerError unexpected error

swagger:response listEventsInternalServerError

func NewListEventsInternalServerError

func NewListEventsInternalServerError() *ListEventsInternalServerError

NewListEventsInternalServerError creates ListEventsInternalServerError with default headers values

func (*ListEventsInternalServerError) WithPayload

WithPayload adds the payload to the list events internal server error response

func (*ListEventsInternalServerError) WriteResponse

func (o *ListEventsInternalServerError) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type ListEventsOK

type ListEventsOK struct {

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

ListEventsOK 一覧取得成功

swagger:response listEventsOK

func NewListEventsOK

func NewListEventsOK() *ListEventsOK

NewListEventsOK creates ListEventsOK with default headers values

func (*ListEventsOK) WithPayload

func (o *ListEventsOK) WithPayload(payload []*models.Event) *ListEventsOK

WithPayload adds the payload to the list events o k response

func (*ListEventsOK) WriteResponse

func (o *ListEventsOK) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type ListEventsParams

type ListEventsParams struct {
	/*maximum number of results to return
	  In: query
	*/
	Limit *int32
}

ListEventsParams contains all the bound params for the list events operation typically these are obtained from a http.Request

swagger:parameters listEvents

func NewListEventsParams

func NewListEventsParams() ListEventsParams

NewListEventsParams creates a new ListEventsParams object with the default values initialized.

func (*ListEventsParams) BindRequest

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

type Ticketing struct {
	Context *middleware.Context
	Params  TicketingParams
	Handler TicketingHandler
}

Ticketing swagger:route PUT /events/{id}/tickets/{uid} ticketing

発券

func NewTicketing

func NewTicketing(ctx *middleware.Context, handler TicketingHandler) *Ticketing

NewTicketing creates a new http.Handler for the ticketing operation

func (*Ticketing) ServeHTTP

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

type TicketingConflict

type TicketingConflict struct {
}

TicketingConflict Conflict(発券済み)

swagger:response ticketingConflict

func NewTicketingConflict

func NewTicketingConflict() *TicketingConflict

NewTicketingConflict creates TicketingConflict with default headers values

func (*TicketingConflict) WriteResponse

func (o *TicketingConflict) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type TicketingForbidden

type TicketingForbidden struct {
}

TicketingForbidden 発券数超過で発券を中止

swagger:response ticketingForbidden

func NewTicketingForbidden

func NewTicketingForbidden() *TicketingForbidden

NewTicketingForbidden creates TicketingForbidden with default headers values

func (*TicketingForbidden) WriteResponse

func (o *TicketingForbidden) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type TicketingHandler

type TicketingHandler interface {
	Handle(TicketingParams) middleware.Responder
}

TicketingHandler interface for that can handle valid ticketing params

type TicketingHandlerFunc

type TicketingHandlerFunc func(TicketingParams) middleware.Responder

TicketingHandlerFunc turns a function with the right signature into a ticketing handler

func (TicketingHandlerFunc) Handle

Handle executing the request and returning a response

type TicketingInternalServerError

type TicketingInternalServerError struct {

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

TicketingInternalServerError unexpected error

swagger:response ticketingInternalServerError

func NewTicketingInternalServerError

func NewTicketingInternalServerError() *TicketingInternalServerError

NewTicketingInternalServerError creates TicketingInternalServerError with default headers values

func (*TicketingInternalServerError) WithPayload

WithPayload adds the payload to the ticketing internal server error response

func (*TicketingInternalServerError) WriteResponse

func (o *TicketingInternalServerError) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type TicketingNotFound

type TicketingNotFound struct {
}

TicketingNotFound eventが見つからない

swagger:response ticketingNotFound

func NewTicketingNotFound

func NewTicketingNotFound() *TicketingNotFound

NewTicketingNotFound creates TicketingNotFound with default headers values

func (*TicketingNotFound) WriteResponse

func (o *TicketingNotFound) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type TicketingOK

type TicketingOK struct {

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

TicketingOK チケット発券

swagger:response ticketingOK

func NewTicketingOK

func NewTicketingOK() *TicketingOK

NewTicketingOK creates TicketingOK with default headers values

func (*TicketingOK) WithPayload

func (o *TicketingOK) WithPayload(payload *models.Ticket) *TicketingOK

WithPayload adds the payload to the ticketing o k response

func (*TicketingOK) WriteResponse

func (o *TicketingOK) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type TicketingParams

type TicketingParams struct {
	/*イベントid
	  Required: true
	  In: path
	*/
	ID string
	/*uid
	  Required: true
	  In: path
	*/
	UID string
}

TicketingParams contains all the bound params for the ticketing operation typically these are obtained from a http.Request

swagger:parameters ticketing

func NewTicketingParams

func NewTicketingParams() TicketingParams

NewTicketingParams creates a new TicketingParams object with the default values initialized.

func (*TicketingParams) BindRequest

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

Jump to

Keyboard shortcuts

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