request

package
v0.0.0-...-8940f0c Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AWSGetClusters

func AWSGetClusters(accessKeyId, secretAccessKey, region string) (string, error)

AWSGetClusters returns all EKS clusters from AWS.

func AWSGetToken

func AWSGetToken(accessKeyId, secretAccessKey, region, clusterID string) (string, error)

AWSGetToken returns a bearer token for Kubernetes API requests. See: https://github.com/kubernetes-sigs/aws-iam-authenticator/blob/7547c74e660f8d34d9980f2c69aa008eed1f48d0/pkg/token/token.go#L310

func AzureGetClusters

func AzureGetClusters(subscriptionID, clientID, clientSecret, tenantID, resourceGroupName string, admin bool) (string, error)

AzureGetClusters return all Kubeconfigs for all AKS clusters for the provided subscription and resource group.

func Do

func Do(method, url, body, certificateAuthorityData, clientCertificateData, clientKeyData, token, username, password string, insecureSkipTLSVerify bool, timeout int64) (string, error)

Do runs the given HTTP request.

func OIDCGetAccessToken

func OIDCGetAccessToken(discoveryURL, clientID, clientSecret, redirectURL, refreshToken string) (string, error)

OIDCGetAccessToken is used to retrieve an access token from a refresh token.

func OIDCGetLink(discoveryURL, clientID, clientSecret, redirectURL string) (string, error)

OIDCGetLink returns the link for the configured OIDC provider. The Link can then be used by the user to login.

func OIDCGetRefreshToken

func OIDCGetRefreshToken(discoveryURL, clientID, clientSecret, redirectURL, code string) (string, error)

Types

type APIError

type APIError struct {
	Kind       string `json:"kind"`
	APIVersion string `json:"apiVersion"`
	Status     string `json:"status"`
	Message    string `json:"message"`
	Reason     string `json:"reason"`
	Code       int    `json:"code"`
}

Jump to

Keyboard shortcuts

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