clients

package
v0.0.0-...-9f3e423 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

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

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

func CountRequest(url string) (int, error)

Helper method to make the count request

func DeleteRequest

func DeleteRequest(url string) error

Helper method to make the delete request

func GetRequest

func GetRequest(url string) ([]byte, error)

Helper method to make the get request and return the body

func PostJsonRequest

func PostJsonRequest(url string, data interface{}) (string, error)

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

func PostRequest

func PostRequest(url string, data []byte, content string) (string, error)

Helper method to make the post request and return the body

func PutRequest

func PutRequest(url string, body []byte) (string, error)

Helper method to make the put request

func UpdateRequest

func UpdateRequest(url string, data interface{}) error

Helper method to make the update request

func UploadFileRequest

func UploadFileRequest(url string, filePath string) (string, error)

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

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
******************************************************************************
******************************************************************************
******************************************************************************
******************************************************************************

Jump to

Keyboard shortcuts

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