util

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

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

Go to latest
Published: Feb 25, 2019 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoGet

func DoGet(c *http.Client, url string) (body []byte, e error)

DoGet is a wrapper around performing HTTP GET requests

func DoPost

func DoPost(c *http.Client, url string, contentType string, body io.Reader) (resp []byte, e error)

DoPost is a wrapper around performing HTTP POST requests

func GetAuthToken

func GetAuthToken() string

GetAuthToken gets the session token

func GetClient

func GetClient(verify bool) *http.Client

GetClient is a convenience function returning an http client

func GetDCAAuthToken

func GetDCAAuthToken() string

GetDCAAuthToken gets the session token

func SetAuthToken

func SetAuthToken() error

SetAuthToken sets the session token Requires that the config has been set up before calling

func SetDCAAuthToken

func SetDCAAuthToken() error

SetDCAAuthToken sets the session token for the Cluster Agent Requires that the config has been set up before calling

func Validate

func Validate(w http.ResponseWriter, r *http.Request) error

Validate validates an http request

func ValidateDCARequest

func ValidateDCARequest(w http.ResponseWriter, r *http.Request) error

ValidateDCARequest is used for the exposed endpoints of the DCA. It is different from Validate as we want to have different validations.

Types

This section is empty.

Jump to

Keyboard shortcuts

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