Documentation
¶
Index ¶
- type Client
- func (a *Client) GetCurrentBookings(params *GetCurrentBookingsParams, authInfo runtime.ClientAuthInfoWriter, ...) (*GetCurrentBookingsOK, error)
- func (a *Client) Login(params *LoginParams, authInfo runtime.ClientAuthInfoWriter, ...) (*LoginOK, error)
- func (a *Client) SetTransport(transport runtime.ClientTransport)
- type ClientOption
- type ClientService
- type GetCurrentBookingsInternalServerError
- type GetCurrentBookingsNotFound
- type GetCurrentBookingsOK
- type GetCurrentBookingsParams
- func NewGetCurrentBookingsParams() *GetCurrentBookingsParams
- func NewGetCurrentBookingsParamsWithContext(ctx context.Context) *GetCurrentBookingsParams
- func NewGetCurrentBookingsParamsWithHTTPClient(client *http.Client) *GetCurrentBookingsParams
- func NewGetCurrentBookingsParamsWithTimeout(timeout time.Duration) *GetCurrentBookingsParams
- func (o *GetCurrentBookingsParams) SetContext(ctx context.Context)
- func (o *GetCurrentBookingsParams) SetDefaults()
- func (o *GetCurrentBookingsParams) SetHTTPClient(client *http.Client)
- func (o *GetCurrentBookingsParams) SetTimeout(timeout time.Duration)
- func (o *GetCurrentBookingsParams) WithContext(ctx context.Context) *GetCurrentBookingsParams
- func (o *GetCurrentBookingsParams) WithDefaults() *GetCurrentBookingsParams
- func (o *GetCurrentBookingsParams) WithHTTPClient(client *http.Client) *GetCurrentBookingsParams
- func (o *GetCurrentBookingsParams) WithTimeout(timeout time.Duration) *GetCurrentBookingsParams
- func (o *GetCurrentBookingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type GetCurrentBookingsReader
- type GetCurrentBookingsUnauthorized
- type LoginBody
- type LoginInternalServerError
- type LoginOK
- type LoginParams
- func (o *LoginParams) SetContext(ctx context.Context)
- func (o *LoginParams) SetDefaults()
- func (o *LoginParams) SetExpired(expired LoginBody)
- func (o *LoginParams) SetHTTPClient(client *http.Client)
- func (o *LoginParams) SetTimeout(timeout time.Duration)
- func (o *LoginParams) WithContext(ctx context.Context) *LoginParams
- func (o *LoginParams) WithDefaults() *LoginParams
- func (o *LoginParams) WithExpired(expired LoginBody) *LoginParams
- func (o *LoginParams) WithHTTPClient(client *http.Client) *LoginParams
- func (o *LoginParams) WithTimeout(timeout time.Duration) *LoginParams
- func (o *LoginParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type LoginReader
- type LoginUnauthorized
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for login API
func (*Client) GetCurrentBookings ¶
func (a *Client) GetCurrentBookings(params *GetCurrentBookingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCurrentBookingsOK, error)
GetCurrentBookings gets current bookings
Get details of currently held bookings and max number of bookings that can be held
func (*Client) Login ¶
func (a *Client) Login(params *LoginParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LoginOK, error)
Login logins
Login with a class token to get an individual booking token, usable for a finite period.
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
type ClientOption ¶
type ClientOption func(*runtime.ClientOperation)
ClientOption is the option for Client methods
type ClientService ¶
type ClientService interface {
GetCurrentBookings(params *GetCurrentBookingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCurrentBookingsOK, error)
Login(params *LoginParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*LoginOK, error)
SetTransport(transport runtime.ClientTransport)
}
ClientService is the interface for Client methods
func New ¶
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService
New creates a new login API client.
type GetCurrentBookingsInternalServerError ¶
type GetCurrentBookingsInternalServerError struct {
Payload interface{}
}
GetCurrentBookingsInternalServerError describes a response with status code 500, with default header values.
Internal Error
func NewGetCurrentBookingsInternalServerError ¶
func NewGetCurrentBookingsInternalServerError() *GetCurrentBookingsInternalServerError
NewGetCurrentBookingsInternalServerError creates a GetCurrentBookingsInternalServerError with default headers values
func (*GetCurrentBookingsInternalServerError) Error ¶
func (o *GetCurrentBookingsInternalServerError) Error() string
func (*GetCurrentBookingsInternalServerError) GetPayload ¶
func (o *GetCurrentBookingsInternalServerError) GetPayload() interface{}
type GetCurrentBookingsNotFound ¶
type GetCurrentBookingsNotFound struct {
Payload interface{}
}
GetCurrentBookingsNotFound describes a response with status code 404, with default header values.
Not Found
func NewGetCurrentBookingsNotFound ¶
func NewGetCurrentBookingsNotFound() *GetCurrentBookingsNotFound
NewGetCurrentBookingsNotFound creates a GetCurrentBookingsNotFound with default headers values
func (*GetCurrentBookingsNotFound) Error ¶
func (o *GetCurrentBookingsNotFound) Error() string
func (*GetCurrentBookingsNotFound) GetPayload ¶
func (o *GetCurrentBookingsNotFound) GetPayload() interface{}
type GetCurrentBookingsOK ¶
GetCurrentBookingsOK describes a response with status code 200, with default header values.
GetCurrentBookingsOK get current bookings o k
func NewGetCurrentBookingsOK ¶
func NewGetCurrentBookingsOK() *GetCurrentBookingsOK
NewGetCurrentBookingsOK creates a GetCurrentBookingsOK with default headers values
func (*GetCurrentBookingsOK) Error ¶
func (o *GetCurrentBookingsOK) Error() string
func (*GetCurrentBookingsOK) GetPayload ¶
func (o *GetCurrentBookingsOK) GetPayload() *models.Bookings
type GetCurrentBookingsParams ¶
type GetCurrentBookingsParams struct {
Context context.Context
HTTPClient *http.Client
// contains filtered or unexported fields
}
GetCurrentBookingsParams contains all the parameters to send to the API endpoint
for the get current bookings operation. Typically these are written to a http.Request.
func NewGetCurrentBookingsParams ¶
func NewGetCurrentBookingsParams() *GetCurrentBookingsParams
NewGetCurrentBookingsParams creates a new GetCurrentBookingsParams object, with the default timeout for this client.
Default values are not hydrated, since defaults are normally applied by the API server side.
To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewGetCurrentBookingsParamsWithContext ¶
func NewGetCurrentBookingsParamsWithContext(ctx context.Context) *GetCurrentBookingsParams
NewGetCurrentBookingsParamsWithContext creates a new GetCurrentBookingsParams object with the ability to set a context for a request.
func NewGetCurrentBookingsParamsWithHTTPClient ¶
func NewGetCurrentBookingsParamsWithHTTPClient(client *http.Client) *GetCurrentBookingsParams
NewGetCurrentBookingsParamsWithHTTPClient creates a new GetCurrentBookingsParams object with the ability to set a custom HTTPClient for a request.
func NewGetCurrentBookingsParamsWithTimeout ¶
func NewGetCurrentBookingsParamsWithTimeout(timeout time.Duration) *GetCurrentBookingsParams
NewGetCurrentBookingsParamsWithTimeout creates a new GetCurrentBookingsParams object with the ability to set a timeout on a request.
func (*GetCurrentBookingsParams) SetContext ¶
func (o *GetCurrentBookingsParams) SetContext(ctx context.Context)
SetContext adds the context to the get current bookings params
func (*GetCurrentBookingsParams) SetDefaults ¶
func (o *GetCurrentBookingsParams) SetDefaults()
SetDefaults hydrates default values in the get current bookings params (not the query body).
All values with no default are reset to their zero value.
func (*GetCurrentBookingsParams) SetHTTPClient ¶
func (o *GetCurrentBookingsParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the get current bookings params
func (*GetCurrentBookingsParams) SetTimeout ¶
func (o *GetCurrentBookingsParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the get current bookings params
func (*GetCurrentBookingsParams) WithContext ¶
func (o *GetCurrentBookingsParams) WithContext(ctx context.Context) *GetCurrentBookingsParams
WithContext adds the context to the get current bookings params
func (*GetCurrentBookingsParams) WithDefaults ¶
func (o *GetCurrentBookingsParams) WithDefaults() *GetCurrentBookingsParams
WithDefaults hydrates default values in the get current bookings params (not the query body).
All values with no default are reset to their zero value.
func (*GetCurrentBookingsParams) WithHTTPClient ¶
func (o *GetCurrentBookingsParams) WithHTTPClient(client *http.Client) *GetCurrentBookingsParams
WithHTTPClient adds the HTTPClient to the get current bookings params
func (*GetCurrentBookingsParams) WithTimeout ¶
func (o *GetCurrentBookingsParams) WithTimeout(timeout time.Duration) *GetCurrentBookingsParams
WithTimeout adds the timeout to the get current bookings params
func (*GetCurrentBookingsParams) WriteToRequest ¶
func (o *GetCurrentBookingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type GetCurrentBookingsReader ¶
type GetCurrentBookingsReader struct {
// contains filtered or unexported fields
}
GetCurrentBookingsReader is a Reader for the GetCurrentBookings structure.
func (*GetCurrentBookingsReader) ReadResponse ¶
func (o *GetCurrentBookingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type GetCurrentBookingsUnauthorized ¶
type GetCurrentBookingsUnauthorized struct {
}
GetCurrentBookingsUnauthorized describes a response with status code 401, with default header values.
Unauthorized
func NewGetCurrentBookingsUnauthorized ¶
func NewGetCurrentBookingsUnauthorized() *GetCurrentBookingsUnauthorized
NewGetCurrentBookingsUnauthorized creates a GetCurrentBookingsUnauthorized with default headers values
func (*GetCurrentBookingsUnauthorized) Error ¶
func (o *GetCurrentBookingsUnauthorized) Error() string
func (*GetCurrentBookingsUnauthorized) GetPayload ¶
func (o *GetCurrentBookingsUnauthorized) GetPayload() interface{}
type LoginBody ¶
type LoginBody struct {
// booking token
// Example: ey...
Token string `json:"token,omitempty"`
}
LoginBody login body swagger:model LoginBody
func (*LoginBody) ContextValidate ¶
ContextValidate validates this login body based on context it is used
func (*LoginBody) MarshalBinary ¶
MarshalBinary interface implementation
func (*LoginBody) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type LoginInternalServerError ¶
type LoginInternalServerError struct {
Payload interface{}
}
LoginInternalServerError describes a response with status code 500, with default header values.
Internal Error
func NewLoginInternalServerError ¶
func NewLoginInternalServerError() *LoginInternalServerError
NewLoginInternalServerError creates a LoginInternalServerError with default headers values
func (*LoginInternalServerError) Error ¶
func (o *LoginInternalServerError) Error() string
func (*LoginInternalServerError) GetPayload ¶
func (o *LoginInternalServerError) GetPayload() interface{}
type LoginOK ¶
type LoginOK struct {
Payload *models.Bookingtoken
}
LoginOK describes a response with status code 200, with default header values.
LoginOK login o k
func NewLoginOK ¶
func NewLoginOK() *LoginOK
NewLoginOK creates a LoginOK with default headers values
func (*LoginOK) GetPayload ¶
func (o *LoginOK) GetPayload() *models.Bookingtoken
type LoginParams ¶
type LoginParams struct {
// Expired.
Expired LoginBody
Context context.Context
HTTPClient *http.Client
// contains filtered or unexported fields
}
LoginParams contains all the parameters to send to the API endpoint
for the login operation. Typically these are written to a http.Request.
func NewLoginParams ¶
func NewLoginParams() *LoginParams
NewLoginParams creates a new LoginParams object, with the default timeout for this client.
Default values are not hydrated, since defaults are normally applied by the API server side.
To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewLoginParamsWithContext ¶
func NewLoginParamsWithContext(ctx context.Context) *LoginParams
NewLoginParamsWithContext creates a new LoginParams object with the ability to set a context for a request.
func NewLoginParamsWithHTTPClient ¶
func NewLoginParamsWithHTTPClient(client *http.Client) *LoginParams
NewLoginParamsWithHTTPClient creates a new LoginParams object with the ability to set a custom HTTPClient for a request.
func NewLoginParamsWithTimeout ¶
func NewLoginParamsWithTimeout(timeout time.Duration) *LoginParams
NewLoginParamsWithTimeout creates a new LoginParams object with the ability to set a timeout on a request.
func (*LoginParams) SetContext ¶
func (o *LoginParams) SetContext(ctx context.Context)
SetContext adds the context to the login params
func (*LoginParams) SetDefaults ¶
func (o *LoginParams) SetDefaults()
SetDefaults hydrates default values in the login params (not the query body).
All values with no default are reset to their zero value.
func (*LoginParams) SetExpired ¶
func (o *LoginParams) SetExpired(expired LoginBody)
SetExpired adds the expired to the login params
func (*LoginParams) SetHTTPClient ¶
func (o *LoginParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the login params
func (*LoginParams) SetTimeout ¶
func (o *LoginParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the login params
func (*LoginParams) WithContext ¶
func (o *LoginParams) WithContext(ctx context.Context) *LoginParams
WithContext adds the context to the login params
func (*LoginParams) WithDefaults ¶
func (o *LoginParams) WithDefaults() *LoginParams
WithDefaults hydrates default values in the login params (not the query body).
All values with no default are reset to their zero value.
func (*LoginParams) WithExpired ¶
func (o *LoginParams) WithExpired(expired LoginBody) *LoginParams
WithExpired adds the expired to the login params
func (*LoginParams) WithHTTPClient ¶
func (o *LoginParams) WithHTTPClient(client *http.Client) *LoginParams
WithHTTPClient adds the HTTPClient to the login params
func (*LoginParams) WithTimeout ¶
func (o *LoginParams) WithTimeout(timeout time.Duration) *LoginParams
WithTimeout adds the timeout to the login params
func (*LoginParams) WriteToRequest ¶
func (o *LoginParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type LoginReader ¶
type LoginReader struct {
// contains filtered or unexported fields
}
LoginReader is a Reader for the Login structure.
func (*LoginReader) ReadResponse ¶
func (o *LoginReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type LoginUnauthorized ¶
type LoginUnauthorized struct {
}
LoginUnauthorized describes a response with status code 401, with default header values.
Unauthorized
func NewLoginUnauthorized ¶
func NewLoginUnauthorized() *LoginUnauthorized
NewLoginUnauthorized creates a LoginUnauthorized with default headers values
func (*LoginUnauthorized) Error ¶
func (o *LoginUnauthorized) Error() string
func (*LoginUnauthorized) GetPayload ¶
func (o *LoginUnauthorized) GetPayload() interface{}