cliutil

package
v0.0.0-...-326ad03 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthEnvClient

func AuthEnvClient() (*http.Client, *url.URL, error)

AuthEnvClient creates a client that is authenticated based on configuration environment variables.

Also returns the server base URL.

func Authenticate

func Authenticate(c *http.Client, u url.URL, password string) error

Authenticate configures the client to access a server with the base URL and password, returning an error if the login fails.

func PrintEnvUsage

func PrintEnvUsage()

PrintEnvUsage writes instructions on setting up authentication via environment variables to stderr.

func ReadEnv

func ReadEnv() (baseURL *url.URL, password string, err error)

ReadEnv reads authentication environment variables, or returns an error if the variables were invalid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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