Documentation ¶
Index ¶
- Constants
- func CountRequest(url string, ctx context.Context) (int, error)
- func DeleteRequest(url string, ctx context.Context) error
- func FromContext(key string, ctx context.Context) string
- func GetRequest(url string, ctx context.Context) ([]byte, error)
- func PostJsonRequest(url string, data interface{}, ctx context.Context) (string, error)
- func PostRequest(url string, data []byte, ctx context.Context) (string, error)
- func PutRequest(url string, body []byte, ctx context.Context) (string, error)
- func UpdateRequest(url string, data interface{}, ctx context.Context) error
- func UploadFileRequest(url string, filePath string, ctx context.Context) (string, error)
- type CorrelatedRequest
Constants ¶
View Source
const ( ApiBase = "/api/v1" ApiAddressableRoute = "/api/v1/addressable" ApiCallbackRoute = "/api/v1/callback" ApiCommandRoute = "/api/v1/command" ApiConfigRoute = "/api/v1/config" ApiDeviceRoute = "/api/v1/device" ApiDeviceProfileRoute = "/api/v1/deviceprofile" ApiDeviceServiceRoute = "/api/v1/deviceservice" ApiEventRoute = "/api/v1/event" ApiLoggingRoute = "/api/v1/logs" ApiMetricsRoute = "/api/v1/metrics" ApiNotificationRoute = "/api/v1/notification" ApiNotifyRegistrationRoute = "/api/v1/notify/registrations" ApiPingRoute = "/api/v1/ping" ApiProvisionWatcherRoute = "/api/v1/provisionwatcher" ApiRegistrationRoute = "/api/v1/registration" ApiRegistrationByNameRoute = ApiRegistrationRoute + "/name" ApiSubscriptionRoute = "/api/v1/subscription" ApiTransmissionRoute = "/api/v1/transmission" ApiIntervalRoute = "/api/v1/interval" ApiIntervalActionRoute = "/api/v1/intervalaction" )
View Source
const ( ServiceKeyPrefix = "edgex-" CoreCommandServiceKey = "edgex-core-command" CoreDataServiceKey = "edgex-core-data" CoreMetaDataServiceKey = "edgex-core-metadata" ExportClientServiceKey = "edgex-export-client" ExportDistroServiceKey = "edgex-export-distro" SupportLoggingServiceKey = "edgex-support-logging" SupportNotificationsServiceKey = "edgex-support-notifications" SystemManagementAgentServiceKey = "edgex-sys-mgmt-agent" SupportSchedulerServiceKey = "edgex-support-scheduler" )
View Source
const ( ContentType = "Content-Type" ContentTypeCBOR = "application/cbor" ContentTypeJSON = "application/json" ContentTypeYAML = "application/x-yaml" )
View Source
const (
CorrelationHeader = "correlation-id"
)
Variables ¶
This section is empty.
Functions ¶
func CountRequest ¶
Helper method to make the count request
func DeleteRequest ¶
Helper method to make the delete request
func GetRequest ¶
Helper method to make the get request and return the body
func PostJsonRequest ¶
Helper method to make the post JSON request and return the body
func PostRequest ¶
Helper method to make the post request and return the body
func PutRequest ¶
Helper method to make the put request
func UpdateRequest ¶
Helper method to make the update request
Types ¶
type CorrelatedRequest ¶
type CorrelatedRequest struct {
}func NewCorrelatedRequest ¶
func NewCorrelatedRequest(req *http.Request, ctx context.Context) CorrelatedRequest
Click to show internal directories.
Click to hide internal directories.