config

package
v0.0.0-...-d214319 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAgent = "huaweicloud-kubernetes-csi"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudCredentials

type CloudCredentials struct {
	Global struct {
		Cloud      string `gcfg:"cloud"`
		AuthURL    string `gcfg:"auth-url"`
		Region     string `gcfg:"region"`
		DomainName string `gcfg:"domain-name"`
		Username   string `gcfg:"username"`
		Password   string `gcfg:"password"`
		AccessKey  string `gcfg:"access-key"`
		SecretKey  string `gcfg:"secret-key"`
		ProjectID  string `gcfg:"project-id"`
	}

	Vpc struct {
		ID              string `gcfg:"id"`
		SubnetID        string `gcfg:"subnet-id"`
		SecurityGroupID string `gcfg:"security-group-id"`
	}

	CloudClient *golangsdk.ProviderClient
}

CloudCredentials define

func LoadConfig

func LoadConfig(configFile string) (*CloudCredentials, error)

LoadConfig from file

func (*CloudCredentials) SFSV2Client

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

func (*CloudCredentials) Validate

func (c *CloudCredentials) Validate() error

Jump to

Keyboard shortcuts

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