clients

package
v0.0.0-...-7b61fee Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

func CountRequest(url string, ctx context.Context) (int, error)

Helper method to make the count request

func DeleteRequest

func DeleteRequest(url string, ctx context.Context) error

Helper method to make the delete request

func FromContext

func FromContext(key string, ctx context.Context) string

func GetRequest

func GetRequest(url string, ctx context.Context) ([]byte, error)

Helper method to make the get request and return the body

func PostJsonRequest

func PostJsonRequest(url string, data interface{}, ctx context.Context) (string, error)

Helper method to make the post JSON request and return the body

func PostRequest

func PostRequest(url string, data []byte, ctx context.Context) (string, error)

Helper method to make the post request and return the body

func PutRequest

func PutRequest(url string, body []byte, ctx context.Context) (string, error)

Helper method to make the put request

func UpdateRequest

func UpdateRequest(url string, data interface{}, ctx context.Context) error

Helper method to make the update request

func UploadFileRequest

func UploadFileRequest(url string, filePath string, ctx context.Context) (string, error)

Helper method to make a post request in order to upload a file and return the request body

Types

type CorrelatedRequest

type CorrelatedRequest struct {
	*http.Request
}

func NewCorrelatedRequest

func NewCorrelatedRequest(req *http.Request, ctx context.Context) CorrelatedRequest

Directories

Path Synopsis
export

Jump to

Keyboard shortcuts

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