dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts@v1.0.2/clients/interfaces/intervalaction.go (about) 1 // 2 // Copyright (C) 2021 IOTech Ltd 3 // 4 // SPDX-License-Identifier: Apache-2.0 5 6 package interfaces 7 8 import ( 9 "context" 10 11 "dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/dtos/common" 12 "dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/dtos/requests" 13 "dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/dtos/responses" 14 "dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/errors" 15 ) 16 17 // IntervalActionClient defines the interface for interactions with the IntervalAction endpoint on the EdgeX Foundry support-scheduler service. 18 type IntervalActionClient interface { 19 // Add adds new intervalActions. 20 Add(ctx context.Context, reqs []requests.AddIntervalActionRequest) ([]common.BaseWithIdResponse, errors.EdgeX) 21 // Update updates intervalActions. 22 Update(ctx context.Context, reqs []requests.UpdateIntervalActionRequest) ([]common.BaseResponse, errors.EdgeX) 23 // AllIntervalActions returns all intervalActions. 24 // The result can be limited in a certain range by specifying the offset and limit parameters. 25 // offset: The number of items to skip before starting to collect the result set. Default is 0. 26 // 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. 27 AllIntervalActions(ctx context.Context, offset int, limit int) (responses.MultiIntervalActionsResponse, errors.EdgeX) 28 // IntervalActionByName returns a intervalAction by name. 29 IntervalActionByName(ctx context.Context, name string) (responses.IntervalActionResponse, errors.EdgeX) 30 // DeleteIntervalActionByName deletes a intervalAction by name. 31 DeleteIntervalActionByName(ctx context.Context, name string) (common.BaseResponse, errors.EdgeX) 32 }