requests

package
v0.1.72 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDeviceProfileReqToDeviceProfileModel added in v0.1.67

func AddDeviceProfileReqToDeviceProfileModel(addReq AddDeviceProfileRequest) (DeviceProfiles models.DeviceProfile)

AddDeviceProfileReqToDeviceProfileModel transforms the AddDeviceProfileRequest DTO to the DeviceProfile model

func AddDeviceProfileReqToDeviceProfileModels added in v0.1.67

func AddDeviceProfileReqToDeviceProfileModels(addRequests []AddDeviceProfileRequest) (DeviceProfiles []models.DeviceProfile)

AddDeviceProfileReqToDeviceProfileModels transforms the AddDeviceProfileRequest DTO array to the DeviceProfile model array

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

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

ReplaceDeviceModelFieldsWithDTO replace existing Device's fields with DTO patch

func ReplaceDeviceProfileModelFieldsWithDTO added in v0.1.70

func ReplaceDeviceProfileModelFieldsWithDTO(profile *models.DeviceProfile, patch dtos.UpdateDeviceProfile)

ReplaceDeviceProfileModelFieldsWithDTO replace existing DeviceProfile'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 AddDeviceProfileRequest added in v0.1.67

type AddDeviceProfileRequest struct {
	common.BaseRequest `json:",inline"`
	Profile            dtos.DeviceProfile `json:"profile"`
}

AddDeviceProfileRequest defines the Request Content for POST DeviceProfile DTO. This object and its properties correspond to the AddDeviceProfileRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/AddDeviceProfileRequest

func (*AddDeviceProfileRequest) UnmarshalJSON added in v0.1.67

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

UnmarshalJSON implements the Unmarshaler interface for the AddDeviceProfileRequest type

func (*AddDeviceProfileRequest) UnmarshalYAML added in v0.1.67

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

UnmarshalYAML implements the Unmarshaler interface for the AddDeviceProfileRequest type

func (AddDeviceProfileRequest) Validate added in v0.1.67

func (dp AddDeviceProfileRequest) Validate() error

Validate satisfies the Validator interface

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

type UpdateDeviceProfileRequest struct {
	common.BaseRequest `json:",inline"`
	Profile            dtos.UpdateDeviceProfile `json:"profile"`
}

UpdateDeviceProfileRequest defines the Request Content for PUT event as pushed DTO. This object and its properties correspond to the UpdateDeviceProfileRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/UpdateDeviceProfileRequest

func (*UpdateDeviceProfileRequest) UnmarshalJSON added in v0.1.70

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

UnmarshalJSON implements the Unmarshaler interface for the UpdateDeviceProfileRequest type

func (UpdateDeviceProfileRequest) Validate added in v0.1.70

func (dp UpdateDeviceProfileRequest) 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

type UpdateEventPushedByChecksumRequest

type UpdateEventPushedByChecksumRequest struct {
	common.BaseRequest `json:",inline"`
	Checksum           string `json:"checksum" validate:"required"`
}

UpdateEventPushedByChecksumRequest defines the Request Content for PUT event as pushed DTO. This object and its properties correspond to the UpdateEventPushedByChecksumRequest object in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/UpdateEventPushedByChecksumRequest

Jump to

Keyboard shortcuts

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