dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts@v1.0.2/clients/interfaces/deviceservice.go (about)

     1  package interfaces
     2  
     3  import (
     4  	"context"
     5  
     6  	"dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/dtos/common"
     7  	"dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/dtos/requests"
     8  	"dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/dtos/responses"
     9  	"dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/errors"
    10  )
    11  
    12  // DeviceServiceClient defines the interface for interactions with the Device Service endpoint on the EdgeX Foundry core-metadata service.
    13  type DeviceServiceClient interface {
    14  	// Add adds new device services.
    15  	Add(ctx context.Context, reqs []requests.AddDeviceServiceRequest) ([]common.BaseWithIdResponse, errors.EdgeX)
    16  	// Update updates device services.
    17  	Update(ctx context.Context, reqs []requests.UpdateDeviceServiceRequest) ([]common.BaseResponse, errors.EdgeX)
    18  	// AllDeviceServices returns all device services. Device services can also be filtered by labels.
    19  	// The result can be limited in a certain range by specifying the offset and limit parameters.
    20  	// offset: The number of items to skip before starting to collect the result set. Default is 0.
    21  	// limit: The number of items to return. Specify -1 will return all remaining items after offset. The maximum will be the MaxResultCount as defined in the configuration of service. Default is 20.
    22  	AllDeviceServices(ctx context.Context, labels []string, offset int, limit int) (responses.MultiDeviceServicesResponse, errors.EdgeX)
    23  	// DeviceServiceByName returns a device service by name.
    24  	DeviceServiceByName(ctx context.Context, name string) (responses.DeviceServiceResponse, errors.EdgeX)
    25  	// DeleteByName deletes a device service by name.
    26  	DeleteByName(ctx context.Context, name string) (common.BaseResponse, errors.EdgeX)
    27  }