clients

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InspectorClient

func InspectorClient(inspectorEndpoint string, auth AuthConfig, tls TLSConfig) (client *gophercloud.ServiceClient, err error)

InspectorClient creates a client for Ironic Inspector

func IronicClient

func IronicClient(ironicEndpoint string, auth AuthConfig, tls TLSConfig) (client *gophercloud.ServiceClient, err error)

IronicClient creates a client for Ironic

Types

type AuthConfig

type AuthConfig struct {
	Type     AuthType
	Username string
	Password string
}

AuthConfig contains data needed to configure authentication in the client

func ConfigFromEndpointURL

func ConfigFromEndpointURL(endpointURL string) (endpoint string, auth AuthConfig, err error)

ConfigFromEndpointURL returns an endpoint and an auth config from an endpoint URL that may contain HTTP basic auth credentials.

func LoadAuth

func LoadAuth() (ironicAuth, inspectorAuth AuthConfig, err error)

LoadAuth loads the Ironic and Inspector configuration from the environment

type AuthType

type AuthType string

AuthType is the method of authenticating requests to the server

const (
	// NoAuth uses no authentication
	NoAuth AuthType = "noauth"
	// HTTPBasicAuth uses HTTP Basic Authentication
	HTTPBasicAuth AuthType = "http_basic"
)

type TLSConfig

type TLSConfig struct {
	TrustedCAFile         string
	ClientCertificateFile string
	ClientPrivateKeyFile  string
	InsecureSkipVerify    bool
	SkipClientSANVerify   bool
}

TLSConfig contains the TLS configuration for the Ironic connection. Using Go default values for this will result in no additional trusted CA certificates and a secure connection. When specifying Certificate and Private key, TLS connection will use client certificate authentication.

Jump to

Keyboard shortcuts

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