utils

package
v0.1.160 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteRequest

func DeleteRequest(ctx context.Context, returnValuePointer interface{}, baseUrl string, requestPath string) errors.EdgeX

Helper method to make the delete request and return the body

func FromContext

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

FromContext allows for the retrieval of the specified key's value from the supplied Context. If the value is not found, an empty string is returned.

func GetRequest

func GetRequest(ctx context.Context, returnValuePointer interface{}, baseUrl string, requestPath string, requestParams url.Values) errors.EdgeX

Helper method to make the get request and return the body

func PatchRequest

func PatchRequest(
	ctx context.Context,
	returnValuePointer interface{},
	url string,
	data interface{}) errors.EdgeX

PatchRequest makes a PATCH request and unmarshals the response to the returnValuePointer

func PostByFileRequest

func PostByFileRequest(
	ctx context.Context,
	returnValuePointer interface{},
	url string,
	filePath string) errors.EdgeX

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

func PostRequest

func PostRequest(
	ctx context.Context,
	returnValuePointer interface{},
	url string,
	data interface{}) errors.EdgeX

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

func PutByFileRequest

func PutByFileRequest(
	ctx context.Context,
	returnValuePointer interface{},
	url string,
	filePath string) errors.EdgeX

Helper method to make the put file request and return the body

func PutRequest

func PutRequest(
	ctx context.Context,
	returnValuePointer interface{},
	url string,
	data interface{}) errors.EdgeX

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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