Documentation ¶
Overview ¶
******************************************************************************
- Copyright 2018 Dell Inc. *
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- in compliance with the License. You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software distributed under the License
- is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- or implied. See the License for the specific language governing permissions and limitations under
- the License. ******************************************************************************
******************************************************************************
- Copyright 2018 Dell Inc. *
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- in compliance with the License. You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software distributed under the License
- is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- or implied. See the License for the specific language governing permissions and limitations under
- the License. ******************************************************************************
Index ¶
- Constants
- func CountRequest(url string) (int, error)
- func DeleteRequest(url string) error
- func GetRequest(url string) ([]byte, error)
- func PostJsonRequest(url string, data interface{}) (string, error)
- func PostRequest(url string, data []byte, content string) (string, error)
- func PutRequest(url string, body []byte) (string, error)
- func UpdateRequest(url string, data interface{}) error
- func UploadFileRequest(url string, filePath string) (string, error)
- type Endpointer
Constants ¶
View Source
const ( ApiAddressableRoute = "/api/v1/addressable" ApiCommandRoute = "/api/v1/command" ApiDeviceRoute = "/api/v1/device" ApiDeviceProfileRoute = "/api/v1/deviceprofile" ApiDeviceServiceRoute = "/api/v1/deviceservice" ApiEventRoute = "/api/v1/event" ApiLoggingRoute = "/api/v1/logs" ApiNotificationRoute = "/api/v1/notification" ApiNotifyRegistrationRoute = "/api/v1/notify/registrations" ApiProvisionWatcherRoute = "/api/v1/provisionwatcher" ApiRegistrationRoute = "/api/v1/registration" ApiRegistrationByNameRoute = ApiRegistrationRoute + "/name" ApiScheduleRoute = "/api/v1/schedule" ApiScheduleEventRoute = "/api/v1/scheduleevent" ApiSubscriptionRoute = "/api/v1/subscription" ApiTransmissionRoute = "/api/v1/transmission" ApiConfigRoute = "/api/v1/config" ApiMetricsRoute = "/api/v1/metrics" ApiPingRoute = "/api/v1/ping" )
View Source
const ( ContentType = "Content-Type" ContentJson = "application/json" ContentYaml = "application/x-yaml" )
View Source
const ClientMonitorDefault = 15000
Variables ¶
This section is empty.
Functions ¶
func CountRequest ¶
Helper method to make the count 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 Endpointer ¶
type Endpointer interface { //Monitor is responsible for looking up information about the service endpoint corresponding //to the params.ServiceKey property. The name "Monitor" implies that this lookup will be done //at a regular interval. Information about the service from the discovery provider should be //used to construct a URL which will then be pushed to the supplied channel. Monitor(params types.EndpointParams, ch chan string) }
Endpointer is the interface for types that need to implement or simulate integration with a service discovery provider.
Directories ¶
Path | Synopsis |
---|---|
******************************************************************************
|
****************************************************************************** |
export
|
|
distro
******************************************************************************
|
****************************************************************************** |
******************************************************************************
|
****************************************************************************** |
******************************************************************************
|
****************************************************************************** |
mocks
Code generated by mockery v1.0.0
|
Code generated by mockery v1.0.0 |
******************************************************************************
|
****************************************************************************** |
******************************************************************************
|
****************************************************************************** |
Click to show internal directories.
Click to hide internal directories.