requests

package
v0.1.129 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: Apache-2.0 Imports: 7 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDeviceReqToDeviceModels added in v0.1.67

func AddDeviceReqToDeviceModels(addRequests []AddDeviceRequest) (Devices []models.Device)

AddDeviceReqToDeviceModels transforms the AddDeviceRequest DTO array to the Device model array

func AddDeviceServiceReqToDeviceServiceModels added in v0.1.67

func AddDeviceServiceReqToDeviceServiceModels(addRequests []AddDeviceServiceRequest) (DeviceServices []models.DeviceService)

AddDeviceServiceReqToDeviceServiceModels transforms the AddDeviceServiceRequest DTO array to the DeviceService model array

func AddEventReqToEventModels

func AddEventReqToEventModels(addRequests []AddEventRequest) (events []models.Event)

AddEventReqToEventModels transforms the AddEventRequest DTO array to the Event model array

func DeviceProfileReqToDeviceProfileModel added in v0.1.94

func DeviceProfileReqToDeviceProfileModel(addReq DeviceProfileRequest) (DeviceProfiles models.DeviceProfile)

DeviceProfileReqToDeviceProfileModel transforms the DeviceProfileRequest DTO to the DeviceProfile model

func DeviceProfileReqToDeviceProfileModels added in v0.1.94

func DeviceProfileReqToDeviceProfileModels(addRequests []DeviceProfileRequest) (DeviceProfiles []models.DeviceProfile)

DeviceProfileReqToDeviceProfileModels transforms the DeviceProfileRequest DTO array to the DeviceProfile model array

func ReplaceDeviceModelFieldsWithDTO added in v0.1.70

func ReplaceDeviceModelFieldsWithDTO(device *models.Device, patch dtos.UpdateDevice)

ReplaceDeviceModelFieldsWithDTO replace existing Device's fields with DTO patch

func ReplaceDeviceServiceModelFieldsWithDTO added in v0.1.70

func ReplaceDeviceServiceModelFieldsWithDTO(ds *models.DeviceService, patch dtos.UpdateDeviceService)

ReplaceDeviceServiceModelFieldsWithDTO replace existing DeviceService's fields with DTO patch

Types

type AddDeviceRequest added in v0.1.67

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 added in v0.1.67

func (d *AddDeviceRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the Unmarshaler interface for the AddDeviceRequest type

func (AddDeviceRequest) Validate added in v0.1.67

func (d AddDeviceRequest) Validate() error

Validate satisfies the Validator interface

type AddDeviceServiceRequest added in v0.1.67

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 added in v0.1.67

func (ds *AddDeviceServiceRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the Unmarshaler interface for the AddDeviceServiceRequest type

func (AddDeviceServiceRequest) Validate added in v0.1.67

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 DeviceProfileRequest added in v0.1.94

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 added in v0.1.94

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

UnmarshalJSON implements the Unmarshaler interface for the DeviceProfileRequest type

func (*DeviceProfileRequest) UnmarshalYAML added in v0.1.94

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

UnmarshalYAML implements the Unmarshaler interface for the DeviceProfileRequest type

func (DeviceProfileRequest) Validate added in v0.1.94

func (dp DeviceProfileRequest) Validate() error

Validate satisfies the Validator interface

type UpdateDeviceRequest added in v0.1.70

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 added in v0.1.70

func (d *UpdateDeviceRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the Unmarshaler interface for the UpdateDeviceRequest type

func (UpdateDeviceRequest) Validate added in v0.1.70

func (d UpdateDeviceRequest) Validate() error

Validate satisfies the Validator interface

type UpdateDeviceServiceRequest added in v0.1.70

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 added in v0.1.70

func (ds *UpdateDeviceServiceRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the Unmarshaler interface for the UpdateDeviceServiceRequest type

func (UpdateDeviceServiceRequest) Validate added in v0.1.70

func (ds UpdateDeviceServiceRequest) 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