config

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Settings

type Settings struct {
	// Base API URL - service endpoints will be constructed from this
	CLOUDCIX_API_URL      string
	CLOUDCIX_API_VERSION  string
	CLOUDCIX_API_USERNAME string
	CLOUDCIX_API_PASSWORD string
	CLOUDCIX_API_KEY      string
	// Default region ID for creating resources
	CLOUDCIX_REGION_ID int
}

Settings holds all configuration values for the CloudCIX SDK

func DefaultSettings

func DefaultSettings() *Settings

DefaultSettings returns the default configuration

func LoadSettings

func LoadSettings(settingsFile ...string) (*Settings, error)

LoadSettings loads configuration from environment variables and optionally from a file

func (*Settings) ComputeURL

func (s *Settings) ComputeURL() string

ComputeURL returns the compute API URL

func (*Settings) GetRegionID

func (s *Settings) GetRegionID() int

GetRegionID returns the configured region ID

func (*Settings) MembershipURL

func (s *Settings) MembershipURL() string

MembershipURL returns the membership API URL

func (*Settings) Validate

func (s *Settings) Validate() error

Validate checks if all required settings are present

Jump to

Keyboard shortcuts

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