config

package
v0.0.0-...-cc4bf99 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadContents

func ReadContents(poc string) (string, bool, error)

ReadContents from file path

Types

type CloudCredentials

type CloudCredentials struct {
	Global struct {
		AuthURL        string `gcfg:"auth-url"`
		Username       string
		UserID         string `gcfg:"user-id"`
		Password       string
		TenantID       string `gcfg:"tenant-id"`
		TenantName     string `gcfg:"tenant-name"`
		DomainID       string `gcfg:"domain-id"`
		DomainName     string `gcfg:"domain-name"`
		Region         string
		AccessKey      string `gcfg:"access-key"`
		SecretKey      string `gcfg:"secret-key"`
		CACertFile     string `gcfg:"cacert-file"`
		ClientCertFile string `gcfg:"cert"`
		ClientKeyFile  string `gcfg:"key"`
		EndpointType   string `gcfg:"endpoint-type"`
		Insecure       bool
	}

	CloudClient     *golangsdk.ProviderClient
	OpenStackClient *gophercloud.ProviderClient
}

CloudCredentials define

func LoadConfig

func LoadConfig(configFile string) (cc CloudCredentials, err error)

LoadConfig from file

func (*CloudCredentials) ComputeV2Client

func (c *CloudCredentials) ComputeV2Client() (*gophercloud.ServiceClient, error)

ComputeV2Client return native compute v2 client

func (*CloudCredentials) NetworkingV1Client

func (c *CloudCredentials) NetworkingV1Client() (*golangsdk.ServiceClient, error)

NetworkingV1Client return native networking v1 client

func (*CloudCredentials) SFSV2Client

func (c *CloudCredentials) SFSV2Client() (*golangsdk.ServiceClient, error)

SFSV2Client return sfs v2 client

func (*CloudCredentials) Validate

func (c *CloudCredentials) Validate() error

Validate CloudCredentials

Jump to

Keyboard shortcuts

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