Documentation ¶
Index ¶
- func AddDeviceReqToDeviceModels(addRequests []AddDeviceRequest) (Devices []models.Device)
- func AddDeviceServiceReqToDeviceServiceModels(addRequests []AddDeviceServiceRequest) (DeviceServices []models.DeviceService)
- func AddEventReqToEventModel(addEventReq AddEventRequest) (event models.Event)
- func AddIntervalActionReqToIntervalActionModels(addRequests []AddIntervalActionRequest) (actions []models.IntervalAction)
- func AddIntervalReqToIntervalModels(addRequests []AddIntervalRequest) (intervals []models.Interval)
- func AddNotificationReqToNotificationModels(reqs []AddNotificationRequest) (n []models.Notification)
- func AddProvisionWatcherReqToProvisionWatcherModels(addRequests []AddProvisionWatcherRequest) (ProvisionWatchers []models.ProvisionWatcher)
- func AddSubscriptionReqToSubscriptionModels(reqs []AddSubscriptionRequest) (s []models.Subscription)
- func DeviceProfileReqToDeviceProfileModel(addReq DeviceProfileRequest) (DeviceProfiles models.DeviceProfile)
- func DeviceProfileReqToDeviceProfileModels(addRequests []DeviceProfileRequest) (DeviceProfiles []models.DeviceProfile)
- func ReplaceDeviceModelFieldsWithDTO(device *models.Device, patch dtos.UpdateDevice)
- func ReplaceDeviceServiceModelFieldsWithDTO(ds *models.DeviceService, patch dtos.UpdateDeviceService)
- func ReplaceIntervalActionModelFieldsWithDTO(action *models.IntervalAction, patch dtos.UpdateIntervalAction)
- func ReplaceIntervalModelFieldsWithDTO(interval *models.Interval, patch dtos.UpdateInterval)
- func ReplaceProvisionWatcherModelFieldsWithDTO(pw *models.ProvisionWatcher, patch dtos.UpdateProvisionWatcher)
- func ReplaceSubscriptionModelFieldsWithDTO(s *models.Subscription, patch dtos.UpdateSubscription)
- type AddDeviceRequest
- type AddDeviceServiceRequest
- type AddEventRequest
- type AddIntervalActionRequest
- type AddIntervalRequest
- type AddNotificationRequest
- type AddProvisionWatcherRequest
- type AddSubscriptionRequest
- type DeviceProfileRequest
- type UpdateDeviceRequest
- type UpdateDeviceServiceRequest
- type UpdateIntervalActionRequest
- type UpdateIntervalRequest
- type UpdateProvisionWatcherRequest
- type UpdateSubscriptionRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDeviceReqToDeviceModels ¶
func AddDeviceReqToDeviceModels(addRequests []AddDeviceRequest) (Devices []models.Device)
AddDeviceReqToDeviceModels transforms the AddDeviceRequest DTO array to the Device model array
func AddDeviceServiceReqToDeviceServiceModels ¶
func AddDeviceServiceReqToDeviceServiceModels(addRequests []AddDeviceServiceRequest) (DeviceServices []models.DeviceService)
AddDeviceServiceReqToDeviceServiceModels transforms the AddDeviceServiceRequest DTO array to the DeviceService model array
func AddEventReqToEventModel ¶
func AddEventReqToEventModel(addEventReq AddEventRequest) (event models.Event)
AddEventReqToEventModel transforms the AddEventRequest DTO to the Event model
func AddIntervalActionReqToIntervalActionModels ¶
func AddIntervalActionReqToIntervalActionModels(addRequests []AddIntervalActionRequest) (actions []models.IntervalAction)
AddIntervalActionReqToIntervalActionModels transforms the AddIntervalActionRequest DTO array to the IntervalAction model array
func AddIntervalReqToIntervalModels ¶
func AddIntervalReqToIntervalModels(addRequests []AddIntervalRequest) (intervals []models.Interval)
AddIntervalReqToIntervalModels transforms the AddIntervalRequest DTO array to the Interval model array
func AddNotificationReqToNotificationModels ¶
func AddNotificationReqToNotificationModels(reqs []AddNotificationRequest) (n []models.Notification)
AddNotificationReqToNotificationModels transforms the AddNotificationRequest DTO array to the AddNotificationRequest model array
func AddProvisionWatcherReqToProvisionWatcherModels ¶
func AddProvisionWatcherReqToProvisionWatcherModels(addRequests []AddProvisionWatcherRequest) (ProvisionWatchers []models.ProvisionWatcher)
AddProvisionWatcherReqToProvisionWatcherModels transforms the AddProvisionWatcherRequest DTO array to the ProvisionWatcher model array
func AddSubscriptionReqToSubscriptionModels ¶
func AddSubscriptionReqToSubscriptionModels(reqs []AddSubscriptionRequest) (s []models.Subscription)
AddSubscriptionReqToSubscriptionModels transforms the AddSubscriptionRequest DTO array to the AddSubscriptionRequest model array
func DeviceProfileReqToDeviceProfileModel ¶
func DeviceProfileReqToDeviceProfileModel(addReq DeviceProfileRequest) (DeviceProfiles models.DeviceProfile)
DeviceProfileReqToDeviceProfileModel transforms the DeviceProfileRequest DTO to the DeviceProfile model
func DeviceProfileReqToDeviceProfileModels ¶
func DeviceProfileReqToDeviceProfileModels(addRequests []DeviceProfileRequest) (DeviceProfiles []models.DeviceProfile)
DeviceProfileReqToDeviceProfileModels transforms the DeviceProfileRequest DTO array to the DeviceProfile model array
func ReplaceDeviceModelFieldsWithDTO ¶
func ReplaceDeviceModelFieldsWithDTO(device *models.Device, patch dtos.UpdateDevice)
ReplaceDeviceModelFieldsWithDTO replace existing Device's fields with DTO patch
func ReplaceDeviceServiceModelFieldsWithDTO ¶
func ReplaceDeviceServiceModelFieldsWithDTO(ds *models.DeviceService, patch dtos.UpdateDeviceService)
ReplaceDeviceServiceModelFieldsWithDTO replace existing DeviceService's fields with DTO patch
func ReplaceIntervalActionModelFieldsWithDTO ¶
func ReplaceIntervalActionModelFieldsWithDTO(action *models.IntervalAction, patch dtos.UpdateIntervalAction)
ReplaceIntervalActionModelFieldsWithDTO replace existing IntervalAction's fields with DTO patch
func ReplaceIntervalModelFieldsWithDTO ¶
func ReplaceIntervalModelFieldsWithDTO(interval *models.Interval, patch dtos.UpdateInterval)
ReplaceIntervalModelFieldsWithDTO replace existing Interval's fields with DTO patch
func ReplaceProvisionWatcherModelFieldsWithDTO ¶
func ReplaceProvisionWatcherModelFieldsWithDTO(pw *models.ProvisionWatcher, patch dtos.UpdateProvisionWatcher)
ReplaceProvisionWatcherModelFieldsWithDTO replace existing ProvisionWatcher's fields with DTO patch
func ReplaceSubscriptionModelFieldsWithDTO ¶
func ReplaceSubscriptionModelFieldsWithDTO(s *models.Subscription, patch dtos.UpdateSubscription)
ReplaceSubscriptionModelFieldsWithDTO replace existing Subscription's fields with DTO patch
Types ¶
type AddDeviceRequest ¶
type AddDeviceRequest struct { common.BaseRequest `json:",inline"` Device dtos.Device `json:"device"` }
AddDeviceRequest defines the Request Content for POST Device DTO. This object and its properties correspond to the AddDeviceRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/AddDeviceRequest
func NewAddDeviceRequest ¶
func NewAddDeviceRequest(dto dtos.Device) AddDeviceRequest
func (*AddDeviceRequest) UnmarshalJSON ¶
func (d *AddDeviceRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the Unmarshaler interface for the AddDeviceRequest type
func (AddDeviceRequest) Validate ¶
func (d AddDeviceRequest) Validate() error
Validate satisfies the Validator interface
type AddDeviceServiceRequest ¶
type AddDeviceServiceRequest struct { common.BaseRequest `json:",inline"` Service dtos.DeviceService `json:"service"` }
AddDeviceServiceRequest defines the Request Content for POST DeviceService DTO. This object and its properties correspond to the AddDeviceServiceRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/AddDeviceServiceRequest
func NewAddDeviceServiceRequest ¶
func NewAddDeviceServiceRequest(dto dtos.DeviceService) AddDeviceServiceRequest
func (*AddDeviceServiceRequest) UnmarshalJSON ¶
func (ds *AddDeviceServiceRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the Unmarshaler interface for the AddDeviceServiceRequest type
func (AddDeviceServiceRequest) Validate ¶
func (ds AddDeviceServiceRequest) Validate() error
Validate satisfies the Validator interface
type AddEventRequest ¶
type AddEventRequest struct { common.BaseRequest `json:",inline"` Event dtos.Event `json:"event" validate:"required"` }
AddEventRequest defines the Request Content for POST event DTO. This object and its properties correspond to the AddEventRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/AddEventRequest
func NewAddEventRequest ¶
func NewAddEventRequest(event dtos.Event) AddEventRequest
NewAddEventRequest creates, initializes and returns an AddEventRequests
func (*AddEventRequest) Unmarshal ¶
func (a *AddEventRequest) Unmarshal(b []byte, f unmarshal) error
func (*AddEventRequest) UnmarshalCBOR ¶
func (a *AddEventRequest) UnmarshalCBOR(b []byte) error
func (*AddEventRequest) UnmarshalJSON ¶
func (a *AddEventRequest) UnmarshalJSON(b []byte) error
func (AddEventRequest) Validate ¶
func (a AddEventRequest) Validate() error
Validate satisfies the Validator interface
type AddIntervalActionRequest ¶
type AddIntervalActionRequest struct { common.BaseRequest `json:",inline"` Action dtos.IntervalAction `json:"action"` }
AddIntervalRequest defines the Request Content for POST Interval DTO. This object and its properties correspond to the AddIntervalRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-scheduler/2.x#/AddIntervalActionRequest
func NewAddIntervalActionRequest ¶
func NewAddIntervalActionRequest(dto dtos.IntervalAction) AddIntervalActionRequest
func (*AddIntervalActionRequest) UnmarshalJSON ¶
func (request *AddIntervalActionRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the Unmarshaler interface for the AddIntervalActionRequest type
func (AddIntervalActionRequest) Validate ¶
func (request AddIntervalActionRequest) Validate() error
Validate satisfies the Validator interface
type AddIntervalRequest ¶
type AddIntervalRequest struct { common.BaseRequest `json:",inline"` Interval dtos.Interval `json:"interval"` }
AddIntervalRequest defines the Request Content for POST Interval DTO. This object and its properties correspond to the AddIntervalRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-scheduler/2.x#/AddIntervalRequest
func NewAddIntervalRequest ¶
func NewAddIntervalRequest(dto dtos.Interval) AddIntervalRequest
func (*AddIntervalRequest) UnmarshalJSON ¶
func (request *AddIntervalRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the Unmarshaler interface for the AddIntervalRequest type
func (AddIntervalRequest) Validate ¶
func (request AddIntervalRequest) Validate() error
Validate satisfies the Validator interface
type AddNotificationRequest ¶
type AddNotificationRequest struct { common.BaseRequest `json:",inline"` Notification dtos.Notification `json:"notification"` }
AddNotificationRequest defines the Request Content for POST Notification DTO. This object and its properties correspond to the AddNotificationRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-notifications/2.x#/AddNotificationRequest
func NewAddNotificationRequest ¶
func NewAddNotificationRequest(dto dtos.Notification) AddNotificationRequest
func (*AddNotificationRequest) UnmarshalJSON ¶
func (request *AddNotificationRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the Unmarshaler interface for the AddNotificationRequest type
func (AddNotificationRequest) Validate ¶
func (request AddNotificationRequest) Validate() error
Validate satisfies the Validator interface
type AddProvisionWatcherRequest ¶
type AddProvisionWatcherRequest struct { common.BaseRequest `json:",inline"` ProvisionWatcher dtos.ProvisionWatcher `json:"provisionWatcher"` }
AddProvisionWatcherRequest defines the Request Content for POST ProvisionWatcher DTO. This object and its properties correspond to the AddProvisionWatcherRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/AddProvisionWatcherRequest
func NewAddProvisionWatcherRequest ¶
func NewAddProvisionWatcherRequest(dto dtos.ProvisionWatcher) AddProvisionWatcherRequest
func (*AddProvisionWatcherRequest) UnmarshalJSON ¶
func (pw *AddProvisionWatcherRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the Unmarshaler interface for the AddProvisionWatcherRequest type
func (AddProvisionWatcherRequest) Validate ¶
func (pw AddProvisionWatcherRequest) Validate() error
Validate satisfies the Validator interface
type AddSubscriptionRequest ¶
type AddSubscriptionRequest struct { common.BaseRequest `json:",inline"` Subscription dtos.Subscription `json:"subscription"` }
AddSubscriptionRequest defines the Request Content for POST Subscription DTO. This object and its properties correspond to the AddSubscriptionRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-notifications/2.x#/AddSubscriptionRequest
func NewAddSubscriptionRequest ¶
func NewAddSubscriptionRequest(dto dtos.Subscription) AddSubscriptionRequest
func (*AddSubscriptionRequest) UnmarshalJSON ¶
func (request *AddSubscriptionRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the Unmarshaler interface for the AddSubscriptionRequest type
func (AddSubscriptionRequest) Validate ¶
func (request AddSubscriptionRequest) Validate() error
Validate satisfies the Validator interface
type DeviceProfileRequest ¶
type DeviceProfileRequest struct { common.BaseRequest `json:",inline"` Profile dtos.DeviceProfile `json:"profile"` }
DeviceProfileRequest defines the Request Content for POST DeviceProfile DTO. This object and its properties correspond to the DeviceProfileRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/AddDeviceProfileRequest
func NewDeviceProfileRequest ¶
func NewDeviceProfileRequest(dto dtos.DeviceProfile) DeviceProfileRequest
func (*DeviceProfileRequest) UnmarshalJSON ¶
func (dp *DeviceProfileRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the Unmarshaler interface for the DeviceProfileRequest type
func (DeviceProfileRequest) Validate ¶
func (dp DeviceProfileRequest) Validate() error
Validate satisfies the Validator interface
type UpdateDeviceRequest ¶
type UpdateDeviceRequest struct { common.BaseRequest `json:",inline"` Device dtos.UpdateDevice `json:"device"` }
UpdateDeviceRequest defines the Request Content for PUT event as pushed DTO. This object and its properties correspond to the UpdateDeviceRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/UpdateDeviceRequest
func NewUpdateDeviceRequest ¶
func NewUpdateDeviceRequest(dto dtos.UpdateDevice) UpdateDeviceRequest
func (*UpdateDeviceRequest) UnmarshalJSON ¶
func (d *UpdateDeviceRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the Unmarshaler interface for the UpdateDeviceRequest type
func (UpdateDeviceRequest) Validate ¶
func (d UpdateDeviceRequest) Validate() error
Validate satisfies the Validator interface
type UpdateDeviceServiceRequest ¶
type UpdateDeviceServiceRequest struct { common.BaseRequest `json:",inline"` Service dtos.UpdateDeviceService `json:"service"` }
UpdateDeviceServiceRequest defines the Request Content for PUT event as pushed DTO. This object and its properties correspond to the UpdateDeviceServiceRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/UpdateDeviceServiceRequest
func NewUpdateDeviceServiceRequest ¶
func NewUpdateDeviceServiceRequest(dto dtos.UpdateDeviceService) UpdateDeviceServiceRequest
func (*UpdateDeviceServiceRequest) UnmarshalJSON ¶
func (ds *UpdateDeviceServiceRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the Unmarshaler interface for the UpdateDeviceServiceRequest type
func (UpdateDeviceServiceRequest) Validate ¶
func (ds UpdateDeviceServiceRequest) Validate() error
Validate satisfies the Validator interface
type UpdateIntervalActionRequest ¶
type UpdateIntervalActionRequest struct { common.BaseRequest `json:",inline"` Action dtos.UpdateIntervalAction `json:"action"` }
UpdateIntervalActionRequest defines the Request Content for PUT event as pushed DTO. This object and its properties correspond to the UpdateIntervalActionRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-scheduler/2.x#/UpdateIntervalActionRequest
func NewUpdateIntervalActionRequest ¶
func NewUpdateIntervalActionRequest(dto dtos.UpdateIntervalAction) UpdateIntervalActionRequest
func (*UpdateIntervalActionRequest) UnmarshalJSON ¶
func (request *UpdateIntervalActionRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the Unmarshaler interface for the UpdateIntervalActionRequest type
func (UpdateIntervalActionRequest) Validate ¶
func (request UpdateIntervalActionRequest) Validate() error
Validate satisfies the Validator interface
type UpdateIntervalRequest ¶
type UpdateIntervalRequest struct { common.BaseRequest `json:",inline"` Interval dtos.UpdateInterval `json:"interval"` }
UpdateIntervalRequest defines the Request Content for PUT event as pushed DTO. This object and its properties correspond to the UpdateIntervalRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-scheduler/2.x#/UpdateIntervalRequest
func NewUpdateIntervalRequest ¶
func NewUpdateIntervalRequest(dto dtos.UpdateInterval) UpdateIntervalRequest
func (*UpdateIntervalRequest) UnmarshalJSON ¶
func (request *UpdateIntervalRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the Unmarshaler interface for the UpdateIntervalRequest type
func (UpdateIntervalRequest) Validate ¶
func (request UpdateIntervalRequest) Validate() error
Validate satisfies the Validator interface
type UpdateProvisionWatcherRequest ¶
type UpdateProvisionWatcherRequest struct { common.BaseRequest `json:",inline"` ProvisionWatcher dtos.UpdateProvisionWatcher `json:"provisionWatcher"` }
UpdateProvisionWatcherRequest defines the Request Content for PUT event as pushed DTO. This object and its properties correspond to the UpdateProvisionWatcherRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/UpdateProvisionWatcherRequest
func NewUpdateProvisionWatcherRequest ¶
func NewUpdateProvisionWatcherRequest(dto dtos.UpdateProvisionWatcher) UpdateProvisionWatcherRequest
func (*UpdateProvisionWatcherRequest) UnmarshalJSON ¶
func (pw *UpdateProvisionWatcherRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the Unmarshaler interface for the UpdateProvisionWatcherRequest type
func (UpdateProvisionWatcherRequest) Validate ¶
func (pw UpdateProvisionWatcherRequest) Validate() error
Validate satisfies the Validator interface
type UpdateSubscriptionRequest ¶
type UpdateSubscriptionRequest struct { common.BaseRequest `json:",inline"` Subscription dtos.UpdateSubscription `json:"subscription"` }
UpdateSubscriptionRequest defines the Request Content for PUT event as pushed DTO. This object and its properties correspond to the UpdateSubscriptionRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-notifications/2.x#/UpdateSubscriptionRequest
func NewUpdateSubscriptionRequest ¶
func NewUpdateSubscriptionRequest(dto dtos.UpdateSubscription) UpdateSubscriptionRequest
func (*UpdateSubscriptionRequest) UnmarshalJSON ¶
func (request *UpdateSubscriptionRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the Unmarshaler interface for the UpdateSubscriptionRequest type
func (UpdateSubscriptionRequest) Validate ¶
func (request UpdateSubscriptionRequest) Validate() error
Validate satisfies the Validator interface