requests

package
v0.1.160 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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 AddProvisionWatcherReqToProvisionWatcherModels

func AddProvisionWatcherReqToProvisionWatcherModels(addRequests []AddProvisionWatcherRequest) (ProvisionWatchers []models.ProvisionWatcher)

AddProvisionWatcherReqToProvisionWatcherModels transforms the AddProvisionWatcherRequest DTO array to the ProvisionWatcher 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 ReplaceProvisionWatcherModelFieldsWithDTO

func ReplaceProvisionWatcherModelFieldsWithDTO(pw *models.ProvisionWatcher, patch dtos.UpdateProvisionWatcher)

ReplaceProvisionWatcherModelFieldsWithDTO replace existing ProvisionWatcher'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 (*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 (*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 (*AddEventRequest) UnmarshalJSON

func (a *AddEventRequest) UnmarshalJSON(b []byte) error

func (AddEventRequest) Validate

func (a AddEventRequest) 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 (*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 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 (*DeviceProfileRequest) UnmarshalJSON

func (dp *DeviceProfileRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the Unmarshaler interface for the DeviceProfileRequest type

func (*DeviceProfileRequest) UnmarshalYAML

func (dp *DeviceProfileRequest) UnmarshalYAML(b []byte) error

UnmarshalYAML 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 (*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 (*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 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 (*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

Jump to

Keyboard shortcuts

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