backend

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	/*
	   EnrolDevice Initiates the process of enrolling the device*/
	EnrolDevice(ctx context.Context, params *EnrolDeviceParams) (*EnrolDeviceOK, *EnrolDeviceCreated, error)
	/*
	   GetDeviceConfiguration Returns the device configuration*/
	GetDeviceConfiguration(ctx context.Context, params *GetDeviceConfigurationParams) (*GetDeviceConfigurationOK, error)
	/*
	   GetRegistrationStatus Returns a device registration status, which can be registered, unregistered or unknown.*/
	GetRegistrationStatus(ctx context.Context, params *GetRegistrationStatusParams) (*GetRegistrationStatusOK, error)
	/*
	   RegisterDevice Registers the device by providing its hardware configuration*/
	RegisterDevice(ctx context.Context, params *RegisterDeviceParams) (*RegisterDeviceOK, error)
	/*
	   UpdateHeartBeat Updates the heartbeat information of the device.*/
	UpdateHeartBeat(ctx context.Context, params *UpdateHeartBeatParams) (*UpdateHeartBeatOK, error)
}

API is the interface of the backend client

type Client

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

Client for backend API

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry, authInfo runtime.ClientAuthInfoWriter) *Client

New creates a new backend API client.

func (*Client) EnrolDevice

func (a *Client) EnrolDevice(ctx context.Context, params *EnrolDeviceParams) (*EnrolDeviceOK, *EnrolDeviceCreated, error)

EnrolDevice Initiates the process of enrolling the device

func (*Client) GetDeviceConfiguration

func (a *Client) GetDeviceConfiguration(ctx context.Context, params *GetDeviceConfigurationParams) (*GetDeviceConfigurationOK, error)

GetDeviceConfiguration Returns the device configuration

func (*Client) GetRegistrationStatus

func (a *Client) GetRegistrationStatus(ctx context.Context, params *GetRegistrationStatusParams) (*GetRegistrationStatusOK, error)

GetRegistrationStatus Returns a device registration status, which can be registered, unregistered or unknown.

func (*Client) RegisterDevice

func (a *Client) RegisterDevice(ctx context.Context, params *RegisterDeviceParams) (*RegisterDeviceOK, error)

RegisterDevice Registers the device by providing its hardware configuration

func (*Client) UpdateHeartBeat

func (a *Client) UpdateHeartBeat(ctx context.Context, params *UpdateHeartBeatParams) (*UpdateHeartBeatOK, error)

UpdateHeartBeat Updates the heartbeat information of the device.

type EnrolDeviceCreated

type EnrolDeviceCreated struct {
}
EnrolDeviceCreated describes a response with status code 201, with default header values.

Created

func NewEnrolDeviceCreated

func NewEnrolDeviceCreated() *EnrolDeviceCreated

NewEnrolDeviceCreated creates a EnrolDeviceCreated with default headers values

func (*EnrolDeviceCreated) Error

func (o *EnrolDeviceCreated) Error() string

type EnrolDeviceDefault

type EnrolDeviceDefault struct {
	Payload *models.Error
	// contains filtered or unexported fields
}
EnrolDeviceDefault describes a response with status code -1, with default header values.

Error

func NewEnrolDeviceDefault

func NewEnrolDeviceDefault(code int) *EnrolDeviceDefault

NewEnrolDeviceDefault creates a EnrolDeviceDefault with default headers values

func (*EnrolDeviceDefault) Code

func (o *EnrolDeviceDefault) Code() int

Code gets the status code for the enrol device default response

func (*EnrolDeviceDefault) Error

func (o *EnrolDeviceDefault) Error() string

func (*EnrolDeviceDefault) GetPayload

func (o *EnrolDeviceDefault) GetPayload() *models.Error

type EnrolDeviceForbidden

type EnrolDeviceForbidden struct {
}
EnrolDeviceForbidden describes a response with status code 403, with default header values.

Forbidden

func NewEnrolDeviceForbidden

func NewEnrolDeviceForbidden() *EnrolDeviceForbidden

NewEnrolDeviceForbidden creates a EnrolDeviceForbidden with default headers values

func (*EnrolDeviceForbidden) Error

func (o *EnrolDeviceForbidden) Error() string

type EnrolDeviceOK

type EnrolDeviceOK struct {
}
EnrolDeviceOK describes a response with status code 200, with default header values.

OK

func NewEnrolDeviceOK

func NewEnrolDeviceOK() *EnrolDeviceOK

NewEnrolDeviceOK creates a EnrolDeviceOK with default headers values

func (*EnrolDeviceOK) Error

func (o *EnrolDeviceOK) Error() string

type EnrolDeviceParams

type EnrolDeviceParams struct {

	/* DeviceID.

	   Device ID
	*/
	DeviceID string

	// EnrolmentInfo.
	EnrolmentInfo commonmodel.EnrolmentInfo

	/* Namespace.

	   Namespace where the device resides
	*/
	Namespace string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

EnrolDeviceParams contains all the parameters to send to the API endpoint

for the enrol device operation.

Typically these are written to a http.Request.

func NewEnrolDeviceParams

func NewEnrolDeviceParams() *EnrolDeviceParams

NewEnrolDeviceParams creates a new EnrolDeviceParams 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 NewEnrolDeviceParamsWithContext

func NewEnrolDeviceParamsWithContext(ctx context.Context) *EnrolDeviceParams

NewEnrolDeviceParamsWithContext creates a new EnrolDeviceParams object with the ability to set a context for a request.

func NewEnrolDeviceParamsWithHTTPClient

func NewEnrolDeviceParamsWithHTTPClient(client *http.Client) *EnrolDeviceParams

NewEnrolDeviceParamsWithHTTPClient creates a new EnrolDeviceParams object with the ability to set a custom HTTPClient for a request.

func NewEnrolDeviceParamsWithTimeout

func NewEnrolDeviceParamsWithTimeout(timeout time.Duration) *EnrolDeviceParams

NewEnrolDeviceParamsWithTimeout creates a new EnrolDeviceParams object with the ability to set a timeout on a request.

func (*EnrolDeviceParams) SetContext

func (o *EnrolDeviceParams) SetContext(ctx context.Context)

SetContext adds the context to the enrol device params

func (*EnrolDeviceParams) SetDefaults

func (o *EnrolDeviceParams) SetDefaults()

SetDefaults hydrates default values in the enrol device params (not the query body).

All values with no default are reset to their zero value.

func (*EnrolDeviceParams) SetDeviceID

func (o *EnrolDeviceParams) SetDeviceID(deviceID string)

SetDeviceID adds the deviceId to the enrol device params

func (*EnrolDeviceParams) SetEnrolmentInfo

func (o *EnrolDeviceParams) SetEnrolmentInfo(enrolmentInfo commonmodel.EnrolmentInfo)

SetEnrolmentInfo adds the enrolmentInfo to the enrol device params

func (*EnrolDeviceParams) SetHTTPClient

func (o *EnrolDeviceParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the enrol device params

func (*EnrolDeviceParams) SetNamespace

func (o *EnrolDeviceParams) SetNamespace(namespace string)

SetNamespace adds the namespace to the enrol device params

func (*EnrolDeviceParams) SetTimeout

func (o *EnrolDeviceParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the enrol device params

func (*EnrolDeviceParams) WithContext

func (o *EnrolDeviceParams) WithContext(ctx context.Context) *EnrolDeviceParams

WithContext adds the context to the enrol device params

func (*EnrolDeviceParams) WithDefaults

func (o *EnrolDeviceParams) WithDefaults() *EnrolDeviceParams

WithDefaults hydrates default values in the enrol device params (not the query body).

All values with no default are reset to their zero value.

func (*EnrolDeviceParams) WithDeviceID

func (o *EnrolDeviceParams) WithDeviceID(deviceID string) *EnrolDeviceParams

WithDeviceID adds the deviceID to the enrol device params

func (*EnrolDeviceParams) WithEnrolmentInfo

func (o *EnrolDeviceParams) WithEnrolmentInfo(enrolmentInfo commonmodel.EnrolmentInfo) *EnrolDeviceParams

WithEnrolmentInfo adds the enrolmentInfo to the enrol device params

func (*EnrolDeviceParams) WithHTTPClient

func (o *EnrolDeviceParams) WithHTTPClient(client *http.Client) *EnrolDeviceParams

WithHTTPClient adds the HTTPClient to the enrol device params

func (*EnrolDeviceParams) WithNamespace

func (o *EnrolDeviceParams) WithNamespace(namespace string) *EnrolDeviceParams

WithNamespace adds the namespace to the enrol device params

func (*EnrolDeviceParams) WithTimeout

func (o *EnrolDeviceParams) WithTimeout(timeout time.Duration) *EnrolDeviceParams

WithTimeout adds the timeout to the enrol device params

func (*EnrolDeviceParams) WriteToRequest

func (o *EnrolDeviceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type EnrolDeviceReader

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

EnrolDeviceReader is a Reader for the EnrolDevice structure.

func (*EnrolDeviceReader) ReadResponse

func (o *EnrolDeviceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type EnrolDeviceUnauthorized

type EnrolDeviceUnauthorized struct {
}
EnrolDeviceUnauthorized describes a response with status code 401, with default header values.

Unauthorized

func NewEnrolDeviceUnauthorized

func NewEnrolDeviceUnauthorized() *EnrolDeviceUnauthorized

NewEnrolDeviceUnauthorized creates a EnrolDeviceUnauthorized with default headers values

func (*EnrolDeviceUnauthorized) Error

func (o *EnrolDeviceUnauthorized) Error() string

type GetDeviceConfigurationDefault

type GetDeviceConfigurationDefault struct {
	Payload *models.DeviceConfigurationResponse
	// contains filtered or unexported fields
}
GetDeviceConfigurationDefault describes a response with status code -1, with default header values.

Error

func NewGetDeviceConfigurationDefault

func NewGetDeviceConfigurationDefault(code int) *GetDeviceConfigurationDefault

NewGetDeviceConfigurationDefault creates a GetDeviceConfigurationDefault with default headers values

func (*GetDeviceConfigurationDefault) Code

Code gets the status code for the get device configuration default response

func (*GetDeviceConfigurationDefault) Error

func (*GetDeviceConfigurationDefault) GetPayload

type GetDeviceConfigurationForbidden

type GetDeviceConfigurationForbidden struct {
}
GetDeviceConfigurationForbidden describes a response with status code 403, with default header values.

Forbidden

func NewGetDeviceConfigurationForbidden

func NewGetDeviceConfigurationForbidden() *GetDeviceConfigurationForbidden

NewGetDeviceConfigurationForbidden creates a GetDeviceConfigurationForbidden with default headers values

func (*GetDeviceConfigurationForbidden) Error

type GetDeviceConfigurationOK

type GetDeviceConfigurationOK struct {
	Payload *models.DeviceConfigurationResponse
}
GetDeviceConfigurationOK describes a response with status code 200, with default header values.

Success

func NewGetDeviceConfigurationOK

func NewGetDeviceConfigurationOK() *GetDeviceConfigurationOK

NewGetDeviceConfigurationOK creates a GetDeviceConfigurationOK with default headers values

func (*GetDeviceConfigurationOK) Error

func (o *GetDeviceConfigurationOK) Error() string

func (*GetDeviceConfigurationOK) GetPayload

type GetDeviceConfigurationParams

type GetDeviceConfigurationParams struct {

	/* DeviceID.

	   Device ID
	*/
	DeviceID string

	/* Namespace.

	   Namespace where the device resides
	*/
	Namespace string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetDeviceConfigurationParams contains all the parameters to send to the API endpoint

for the get device configuration operation.

Typically these are written to a http.Request.

func NewGetDeviceConfigurationParams

func NewGetDeviceConfigurationParams() *GetDeviceConfigurationParams

NewGetDeviceConfigurationParams creates a new GetDeviceConfigurationParams 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 NewGetDeviceConfigurationParamsWithContext

func NewGetDeviceConfigurationParamsWithContext(ctx context.Context) *GetDeviceConfigurationParams

NewGetDeviceConfigurationParamsWithContext creates a new GetDeviceConfigurationParams object with the ability to set a context for a request.

func NewGetDeviceConfigurationParamsWithHTTPClient

func NewGetDeviceConfigurationParamsWithHTTPClient(client *http.Client) *GetDeviceConfigurationParams

NewGetDeviceConfigurationParamsWithHTTPClient creates a new GetDeviceConfigurationParams object with the ability to set a custom HTTPClient for a request.

func NewGetDeviceConfigurationParamsWithTimeout

func NewGetDeviceConfigurationParamsWithTimeout(timeout time.Duration) *GetDeviceConfigurationParams

NewGetDeviceConfigurationParamsWithTimeout creates a new GetDeviceConfigurationParams object with the ability to set a timeout on a request.

func (*GetDeviceConfigurationParams) SetContext

func (o *GetDeviceConfigurationParams) SetContext(ctx context.Context)

SetContext adds the context to the get device configuration params

func (*GetDeviceConfigurationParams) SetDefaults

func (o *GetDeviceConfigurationParams) SetDefaults()

SetDefaults hydrates default values in the get device configuration params (not the query body).

All values with no default are reset to their zero value.

func (*GetDeviceConfigurationParams) SetDeviceID

func (o *GetDeviceConfigurationParams) SetDeviceID(deviceID string)

SetDeviceID adds the deviceId to the get device configuration params

func (*GetDeviceConfigurationParams) SetHTTPClient

func (o *GetDeviceConfigurationParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get device configuration params

func (*GetDeviceConfigurationParams) SetNamespace

func (o *GetDeviceConfigurationParams) SetNamespace(namespace string)

SetNamespace adds the namespace to the get device configuration params

func (*GetDeviceConfigurationParams) SetTimeout

func (o *GetDeviceConfigurationParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get device configuration params

func (*GetDeviceConfigurationParams) WithContext

WithContext adds the context to the get device configuration params

func (*GetDeviceConfigurationParams) WithDefaults

WithDefaults hydrates default values in the get device configuration params (not the query body).

All values with no default are reset to their zero value.

func (*GetDeviceConfigurationParams) WithDeviceID

WithDeviceID adds the deviceID to the get device configuration params

func (*GetDeviceConfigurationParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the get device configuration params

func (*GetDeviceConfigurationParams) WithNamespace

WithNamespace adds the namespace to the get device configuration params

func (*GetDeviceConfigurationParams) WithTimeout

WithTimeout adds the timeout to the get device configuration params

func (*GetDeviceConfigurationParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type GetDeviceConfigurationReader

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

GetDeviceConfigurationReader is a Reader for the GetDeviceConfiguration structure.

func (*GetDeviceConfigurationReader) ReadResponse

func (o *GetDeviceConfigurationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type GetDeviceConfigurationUnauthorized

type GetDeviceConfigurationUnauthorized struct {
}
GetDeviceConfigurationUnauthorized describes a response with status code 401, with default header values.

Unauthorized

func NewGetDeviceConfigurationUnauthorized

func NewGetDeviceConfigurationUnauthorized() *GetDeviceConfigurationUnauthorized

NewGetDeviceConfigurationUnauthorized creates a GetDeviceConfigurationUnauthorized with default headers values

func (*GetDeviceConfigurationUnauthorized) Error

type GetRegistrationStatusDefault

type GetRegistrationStatusDefault struct {
	Payload *models.DeviceRegistrationStatusResponse
	// contains filtered or unexported fields
}
GetRegistrationStatusDefault describes a response with status code -1, with default header values.

Error

func NewGetRegistrationStatusDefault

func NewGetRegistrationStatusDefault(code int) *GetRegistrationStatusDefault

NewGetRegistrationStatusDefault creates a GetRegistrationStatusDefault with default headers values

func (*GetRegistrationStatusDefault) Code

Code gets the status code for the get registration status default response

func (*GetRegistrationStatusDefault) Error

func (*GetRegistrationStatusDefault) GetPayload

type GetRegistrationStatusForbidden

type GetRegistrationStatusForbidden struct {
}
GetRegistrationStatusForbidden describes a response with status code 403, with default header values.

Forbidden

func NewGetRegistrationStatusForbidden

func NewGetRegistrationStatusForbidden() *GetRegistrationStatusForbidden

NewGetRegistrationStatusForbidden creates a GetRegistrationStatusForbidden with default headers values

func (*GetRegistrationStatusForbidden) Error

type GetRegistrationStatusOK

type GetRegistrationStatusOK struct {
	Payload *models.DeviceRegistrationStatusResponse
}
GetRegistrationStatusOK describes a response with status code 200, with default header values.

OK

func NewGetRegistrationStatusOK

func NewGetRegistrationStatusOK() *GetRegistrationStatusOK

NewGetRegistrationStatusOK creates a GetRegistrationStatusOK with default headers values

func (*GetRegistrationStatusOK) Error

func (o *GetRegistrationStatusOK) Error() string

func (*GetRegistrationStatusOK) GetPayload

type GetRegistrationStatusParams

type GetRegistrationStatusParams struct {

	/* DeviceID.

	   Device ID
	*/
	DeviceID string

	/* Namespace.

	   Namespace where the device resides
	*/
	Namespace string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetRegistrationStatusParams contains all the parameters to send to the API endpoint

for the get registration status operation.

Typically these are written to a http.Request.

func NewGetRegistrationStatusParams

func NewGetRegistrationStatusParams() *GetRegistrationStatusParams

NewGetRegistrationStatusParams creates a new GetRegistrationStatusParams 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 NewGetRegistrationStatusParamsWithContext

func NewGetRegistrationStatusParamsWithContext(ctx context.Context) *GetRegistrationStatusParams

NewGetRegistrationStatusParamsWithContext creates a new GetRegistrationStatusParams object with the ability to set a context for a request.

func NewGetRegistrationStatusParamsWithHTTPClient

func NewGetRegistrationStatusParamsWithHTTPClient(client *http.Client) *GetRegistrationStatusParams

NewGetRegistrationStatusParamsWithHTTPClient creates a new GetRegistrationStatusParams object with the ability to set a custom HTTPClient for a request.

func NewGetRegistrationStatusParamsWithTimeout

func NewGetRegistrationStatusParamsWithTimeout(timeout time.Duration) *GetRegistrationStatusParams

NewGetRegistrationStatusParamsWithTimeout creates a new GetRegistrationStatusParams object with the ability to set a timeout on a request.

func (*GetRegistrationStatusParams) SetContext

func (o *GetRegistrationStatusParams) SetContext(ctx context.Context)

SetContext adds the context to the get registration status params

func (*GetRegistrationStatusParams) SetDefaults

func (o *GetRegistrationStatusParams) SetDefaults()

SetDefaults hydrates default values in the get registration status params (not the query body).

All values with no default are reset to their zero value.

func (*GetRegistrationStatusParams) SetDeviceID

func (o *GetRegistrationStatusParams) SetDeviceID(deviceID string)

SetDeviceID adds the deviceId to the get registration status params

func (*GetRegistrationStatusParams) SetHTTPClient

func (o *GetRegistrationStatusParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get registration status params

func (*GetRegistrationStatusParams) SetNamespace

func (o *GetRegistrationStatusParams) SetNamespace(namespace string)

SetNamespace adds the namespace to the get registration status params

func (*GetRegistrationStatusParams) SetTimeout

func (o *GetRegistrationStatusParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get registration status params

func (*GetRegistrationStatusParams) WithContext

WithContext adds the context to the get registration status params

func (*GetRegistrationStatusParams) WithDefaults

WithDefaults hydrates default values in the get registration status params (not the query body).

All values with no default are reset to their zero value.

func (*GetRegistrationStatusParams) WithDeviceID

WithDeviceID adds the deviceID to the get registration status params

func (*GetRegistrationStatusParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the get registration status params

func (*GetRegistrationStatusParams) WithNamespace

func (o *GetRegistrationStatusParams) WithNamespace(namespace string) *GetRegistrationStatusParams

WithNamespace adds the namespace to the get registration status params

func (*GetRegistrationStatusParams) WithTimeout

WithTimeout adds the timeout to the get registration status params

func (*GetRegistrationStatusParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type GetRegistrationStatusReader

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

GetRegistrationStatusReader is a Reader for the GetRegistrationStatus structure.

func (*GetRegistrationStatusReader) ReadResponse

func (o *GetRegistrationStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type GetRegistrationStatusUnauthorized

type GetRegistrationStatusUnauthorized struct {
}
GetRegistrationStatusUnauthorized describes a response with status code 401, with default header values.

Unauthorized

func NewGetRegistrationStatusUnauthorized

func NewGetRegistrationStatusUnauthorized() *GetRegistrationStatusUnauthorized

NewGetRegistrationStatusUnauthorized creates a GetRegistrationStatusUnauthorized with default headers values

func (*GetRegistrationStatusUnauthorized) Error

type MockAPI

type MockAPI struct {
	mock.Mock
}

MockAPI is an autogenerated mock type for the API type

func (*MockAPI) EnrolDevice

func (_m *MockAPI) EnrolDevice(ctx context.Context, params *EnrolDeviceParams) (*EnrolDeviceOK, *EnrolDeviceCreated, error)

EnrolDevice provides a mock function with given fields: ctx, params

func (*MockAPI) GetDeviceConfiguration

func (_m *MockAPI) GetDeviceConfiguration(ctx context.Context, params *GetDeviceConfigurationParams) (*GetDeviceConfigurationOK, error)

GetDeviceConfiguration provides a mock function with given fields: ctx, params

func (*MockAPI) GetRegistrationStatus

func (_m *MockAPI) GetRegistrationStatus(ctx context.Context, params *GetRegistrationStatusParams) (*GetRegistrationStatusOK, error)

GetRegistrationStatus provides a mock function with given fields: ctx, params

func (*MockAPI) RegisterDevice

func (_m *MockAPI) RegisterDevice(ctx context.Context, params *RegisterDeviceParams) (*RegisterDeviceOK, error)

RegisterDevice provides a mock function with given fields: ctx, params

func (*MockAPI) UpdateHeartBeat

func (_m *MockAPI) UpdateHeartBeat(ctx context.Context, params *UpdateHeartBeatParams) (*UpdateHeartBeatOK, error)

UpdateHeartBeat provides a mock function with given fields: ctx, params

type RegisterDeviceDefault

type RegisterDeviceDefault struct {
	Payload *models.Error
	// contains filtered or unexported fields
}
RegisterDeviceDefault describes a response with status code -1, with default header values.

Error

func NewRegisterDeviceDefault

func NewRegisterDeviceDefault(code int) *RegisterDeviceDefault

NewRegisterDeviceDefault creates a RegisterDeviceDefault with default headers values

func (*RegisterDeviceDefault) Code

func (o *RegisterDeviceDefault) Code() int

Code gets the status code for the register device default response

func (*RegisterDeviceDefault) Error

func (o *RegisterDeviceDefault) Error() string

func (*RegisterDeviceDefault) GetPayload

func (o *RegisterDeviceDefault) GetPayload() *models.Error

type RegisterDeviceForbidden

type RegisterDeviceForbidden struct {
}
RegisterDeviceForbidden describes a response with status code 403, with default header values.

Forbidden

func NewRegisterDeviceForbidden

func NewRegisterDeviceForbidden() *RegisterDeviceForbidden

NewRegisterDeviceForbidden creates a RegisterDeviceForbidden with default headers values

func (*RegisterDeviceForbidden) Error

func (o *RegisterDeviceForbidden) Error() string

type RegisterDeviceOK

type RegisterDeviceOK struct {
}
RegisterDeviceOK describes a response with status code 200, with default header values.

Updated

func NewRegisterDeviceOK

func NewRegisterDeviceOK() *RegisterDeviceOK

NewRegisterDeviceOK creates a RegisterDeviceOK with default headers values

func (*RegisterDeviceOK) Error

func (o *RegisterDeviceOK) Error() string

type RegisterDeviceParams

type RegisterDeviceParams struct {

	/* DeviceID.

	   Device ID
	*/
	DeviceID string

	/* Namespace.

	   Namespace where the device resides
	*/
	Namespace string

	// RegistrationInfo.
	RegistrationInfo commonmodel.RegistrationInfo

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

RegisterDeviceParams contains all the parameters to send to the API endpoint

for the register device operation.

Typically these are written to a http.Request.

func NewRegisterDeviceParams

func NewRegisterDeviceParams() *RegisterDeviceParams

NewRegisterDeviceParams creates a new RegisterDeviceParams 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 NewRegisterDeviceParamsWithContext

func NewRegisterDeviceParamsWithContext(ctx context.Context) *RegisterDeviceParams

NewRegisterDeviceParamsWithContext creates a new RegisterDeviceParams object with the ability to set a context for a request.

func NewRegisterDeviceParamsWithHTTPClient

func NewRegisterDeviceParamsWithHTTPClient(client *http.Client) *RegisterDeviceParams

NewRegisterDeviceParamsWithHTTPClient creates a new RegisterDeviceParams object with the ability to set a custom HTTPClient for a request.

func NewRegisterDeviceParamsWithTimeout

func NewRegisterDeviceParamsWithTimeout(timeout time.Duration) *RegisterDeviceParams

NewRegisterDeviceParamsWithTimeout creates a new RegisterDeviceParams object with the ability to set a timeout on a request.

func (*RegisterDeviceParams) SetContext

func (o *RegisterDeviceParams) SetContext(ctx context.Context)

SetContext adds the context to the register device params

func (*RegisterDeviceParams) SetDefaults

func (o *RegisterDeviceParams) SetDefaults()

SetDefaults hydrates default values in the register device params (not the query body).

All values with no default are reset to their zero value.

func (*RegisterDeviceParams) SetDeviceID

func (o *RegisterDeviceParams) SetDeviceID(deviceID string)

SetDeviceID adds the deviceId to the register device params

func (*RegisterDeviceParams) SetHTTPClient

func (o *RegisterDeviceParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the register device params

func (*RegisterDeviceParams) SetNamespace

func (o *RegisterDeviceParams) SetNamespace(namespace string)

SetNamespace adds the namespace to the register device params

func (*RegisterDeviceParams) SetRegistrationInfo

func (o *RegisterDeviceParams) SetRegistrationInfo(registrationInfo commonmodel.RegistrationInfo)

SetRegistrationInfo adds the registrationInfo to the register device params

func (*RegisterDeviceParams) SetTimeout

func (o *RegisterDeviceParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the register device params

func (*RegisterDeviceParams) WithContext

WithContext adds the context to the register device params

func (*RegisterDeviceParams) WithDefaults

func (o *RegisterDeviceParams) WithDefaults() *RegisterDeviceParams

WithDefaults hydrates default values in the register device params (not the query body).

All values with no default are reset to their zero value.

func (*RegisterDeviceParams) WithDeviceID

func (o *RegisterDeviceParams) WithDeviceID(deviceID string) *RegisterDeviceParams

WithDeviceID adds the deviceID to the register device params

func (*RegisterDeviceParams) WithHTTPClient

func (o *RegisterDeviceParams) WithHTTPClient(client *http.Client) *RegisterDeviceParams

WithHTTPClient adds the HTTPClient to the register device params

func (*RegisterDeviceParams) WithNamespace

func (o *RegisterDeviceParams) WithNamespace(namespace string) *RegisterDeviceParams

WithNamespace adds the namespace to the register device params

func (*RegisterDeviceParams) WithRegistrationInfo

func (o *RegisterDeviceParams) WithRegistrationInfo(registrationInfo commonmodel.RegistrationInfo) *RegisterDeviceParams

WithRegistrationInfo adds the registrationInfo to the register device params

func (*RegisterDeviceParams) WithTimeout

func (o *RegisterDeviceParams) WithTimeout(timeout time.Duration) *RegisterDeviceParams

WithTimeout adds the timeout to the register device params

func (*RegisterDeviceParams) WriteToRequest

func (o *RegisterDeviceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type RegisterDeviceReader

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

RegisterDeviceReader is a Reader for the RegisterDevice structure.

func (*RegisterDeviceReader) ReadResponse

func (o *RegisterDeviceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type RegisterDeviceUnauthorized

type RegisterDeviceUnauthorized struct {
}
RegisterDeviceUnauthorized describes a response with status code 401, with default header values.

Unauthorized

func NewRegisterDeviceUnauthorized

func NewRegisterDeviceUnauthorized() *RegisterDeviceUnauthorized

NewRegisterDeviceUnauthorized creates a RegisterDeviceUnauthorized with default headers values

func (*RegisterDeviceUnauthorized) Error

type UpdateHeartBeatDefault

type UpdateHeartBeatDefault struct {
	Payload *models.Error
	// contains filtered or unexported fields
}
UpdateHeartBeatDefault describes a response with status code -1, with default header values.

Error

func NewUpdateHeartBeatDefault

func NewUpdateHeartBeatDefault(code int) *UpdateHeartBeatDefault

NewUpdateHeartBeatDefault creates a UpdateHeartBeatDefault with default headers values

func (*UpdateHeartBeatDefault) Code

func (o *UpdateHeartBeatDefault) Code() int

Code gets the status code for the update heart beat default response

func (*UpdateHeartBeatDefault) Error

func (o *UpdateHeartBeatDefault) Error() string

func (*UpdateHeartBeatDefault) GetPayload

func (o *UpdateHeartBeatDefault) GetPayload() *models.Error

type UpdateHeartBeatForbidden

type UpdateHeartBeatForbidden struct {
}
UpdateHeartBeatForbidden describes a response with status code 403, with default header values.

Forbidden

func NewUpdateHeartBeatForbidden

func NewUpdateHeartBeatForbidden() *UpdateHeartBeatForbidden

NewUpdateHeartBeatForbidden creates a UpdateHeartBeatForbidden with default headers values

func (*UpdateHeartBeatForbidden) Error

func (o *UpdateHeartBeatForbidden) Error() string

type UpdateHeartBeatOK

type UpdateHeartBeatOK struct {
}
UpdateHeartBeatOK describes a response with status code 200, with default header values.

Success

func NewUpdateHeartBeatOK

func NewUpdateHeartBeatOK() *UpdateHeartBeatOK

NewUpdateHeartBeatOK creates a UpdateHeartBeatOK with default headers values

func (*UpdateHeartBeatOK) Error

func (o *UpdateHeartBeatOK) Error() string

type UpdateHeartBeatParams

type UpdateHeartBeatParams struct {

	/* DeviceID.

	   Device ID
	*/
	DeviceID string

	// Heartbeat.
	Heartbeat commonmodel.Heartbeat

	/* Namespace.

	   Namespace where the device resides
	*/
	Namespace string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

UpdateHeartBeatParams contains all the parameters to send to the API endpoint

for the update heart beat operation.

Typically these are written to a http.Request.

func NewUpdateHeartBeatParams

func NewUpdateHeartBeatParams() *UpdateHeartBeatParams

NewUpdateHeartBeatParams creates a new UpdateHeartBeatParams 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 NewUpdateHeartBeatParamsWithContext

func NewUpdateHeartBeatParamsWithContext(ctx context.Context) *UpdateHeartBeatParams

NewUpdateHeartBeatParamsWithContext creates a new UpdateHeartBeatParams object with the ability to set a context for a request.

func NewUpdateHeartBeatParamsWithHTTPClient

func NewUpdateHeartBeatParamsWithHTTPClient(client *http.Client) *UpdateHeartBeatParams

NewUpdateHeartBeatParamsWithHTTPClient creates a new UpdateHeartBeatParams object with the ability to set a custom HTTPClient for a request.

func NewUpdateHeartBeatParamsWithTimeout

func NewUpdateHeartBeatParamsWithTimeout(timeout time.Duration) *UpdateHeartBeatParams

NewUpdateHeartBeatParamsWithTimeout creates a new UpdateHeartBeatParams object with the ability to set a timeout on a request.

func (*UpdateHeartBeatParams) SetContext

func (o *UpdateHeartBeatParams) SetContext(ctx context.Context)

SetContext adds the context to the update heart beat params

func (*UpdateHeartBeatParams) SetDefaults

func (o *UpdateHeartBeatParams) SetDefaults()

SetDefaults hydrates default values in the update heart beat params (not the query body).

All values with no default are reset to their zero value.

func (*UpdateHeartBeatParams) SetDeviceID

func (o *UpdateHeartBeatParams) SetDeviceID(deviceID string)

SetDeviceID adds the deviceId to the update heart beat params

func (*UpdateHeartBeatParams) SetHTTPClient

func (o *UpdateHeartBeatParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the update heart beat params

func (*UpdateHeartBeatParams) SetHeartbeat

func (o *UpdateHeartBeatParams) SetHeartbeat(heartbeat commonmodel.Heartbeat)

SetHeartbeat adds the heartbeat to the update heart beat params

func (*UpdateHeartBeatParams) SetNamespace

func (o *UpdateHeartBeatParams) SetNamespace(namespace string)

SetNamespace adds the namespace to the update heart beat params

func (*UpdateHeartBeatParams) SetTimeout

func (o *UpdateHeartBeatParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the update heart beat params

func (*UpdateHeartBeatParams) WithContext

WithContext adds the context to the update heart beat params

func (*UpdateHeartBeatParams) WithDefaults

func (o *UpdateHeartBeatParams) WithDefaults() *UpdateHeartBeatParams

WithDefaults hydrates default values in the update heart beat params (not the query body).

All values with no default are reset to their zero value.

func (*UpdateHeartBeatParams) WithDeviceID

func (o *UpdateHeartBeatParams) WithDeviceID(deviceID string) *UpdateHeartBeatParams

WithDeviceID adds the deviceID to the update heart beat params

func (*UpdateHeartBeatParams) WithHTTPClient

func (o *UpdateHeartBeatParams) WithHTTPClient(client *http.Client) *UpdateHeartBeatParams

WithHTTPClient adds the HTTPClient to the update heart beat params

func (*UpdateHeartBeatParams) WithHeartbeat

WithHeartbeat adds the heartbeat to the update heart beat params

func (*UpdateHeartBeatParams) WithNamespace

func (o *UpdateHeartBeatParams) WithNamespace(namespace string) *UpdateHeartBeatParams

WithNamespace adds the namespace to the update heart beat params

func (*UpdateHeartBeatParams) WithTimeout

func (o *UpdateHeartBeatParams) WithTimeout(timeout time.Duration) *UpdateHeartBeatParams

WithTimeout adds the timeout to the update heart beat params

func (*UpdateHeartBeatParams) WriteToRequest

func (o *UpdateHeartBeatParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type UpdateHeartBeatReader

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

UpdateHeartBeatReader is a Reader for the UpdateHeartBeat structure.

func (*UpdateHeartBeatReader) ReadResponse

func (o *UpdateHeartBeatReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type UpdateHeartBeatUnauthorized

type UpdateHeartBeatUnauthorized struct {
}
UpdateHeartBeatUnauthorized describes a response with status code 401, with default header values.

Unauthorized

func NewUpdateHeartBeatUnauthorized

func NewUpdateHeartBeatUnauthorized() *UpdateHeartBeatUnauthorized

NewUpdateHeartBeatUnauthorized creates a UpdateHeartBeatUnauthorized with default headers values

func (*UpdateHeartBeatUnauthorized) Error

Jump to

Keyboard shortcuts

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