credentials

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package credentials holds the two guards every driver runs before it talks to a cloud API: the provider credential presence check (bash: utils/credentials.sh, credentials::require) and the HTTPS-only URL check (bash: utils/http.sh, http::require_https). Bearer tokens travel on these calls, never over plain HTTP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NoNewline

func NoNewline(name, value string, stderr io.Writer) error

NoNewline refuses a credential value that contains a CR or LF. The carriers the drivers feed such a value through are line based (a curl config line, an env file for kubectl --from-env-file), so a newline in the value breaks the line. name is the environment variable the value came from. The returned error is already printed (ui.Handled).

func Require

func Require(provider string, stderr io.Writer) error

Require checks the environment variables a provider needs. Every missing variable is reported before the check fails; an unknown provider fails with its own line. The returned error is already printed (ui.Handled).

func RequireHTTPS

func RequireHTTPS(url, label string, stderr io.Writer) error

RequireHTTPS fails when url does not start with https://. label names the URL in the error lines. The returned error is already printed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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