config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// A string specifies the unique identifier of your StackPath account.
	// This field is required for the provider to authenticate with
	// the StackPath API and perform operations on your behalf.
	AccountID string `yaml:"account_id"`

	// A string that specifies the unique identifier of your StackPath Edge Computing stack.
	// This field is required for the provider to create and manage virtual nodes within your stack.
	StackID string `yaml:"stack_id"`

	// A string that specifies the client ID of your StackPath API credentials.
	// This field is required for the provider to authenticate with the StackPath API and
	// perform operations on your behalf.
	ClientID string `yaml:"client_id"`

	// A string that specifies the client secret of your StackPath API credentials.
	// This field is required for the provider to authenticate with the StackPath API and
	// perform operations on your behalf.
	ClientSecret string `yaml:"client_secret"`

	// A string that specifies the API host of the StackPath Edge Computing API.
	// This field is optional and defaults to the production API URL.
	ApiHost string `yaml:"base_url"`

	// A string that specifies the StackPath Point of Presence (PoP) where pods
	// will be created, updated, or deleted. This setting allows you to take
	// advantage of StackPath's global network of edge servers to deploy workloads
	// closer to end-users and reduce latency. The value of this field should correspond
	// to the code name or identifier of a specific StackPath edge location, such as
	// "lax", "dfw", "ord", "iad", "atl", "mia", "ams", "fra", "cdg", "sin", "nrt", etc
	CityCode string `yaml:"city_code"`
}

Config is the provider's configuration

func NewConfig

func NewConfig(ctx context.Context) (*Config, error)

NewConfig creates and loads configuration from either a YAML file or environment variables

func (*Config) Validate

func (config *Config) Validate() error

Validate validates the configuration parameters

Jump to

Keyboard shortcuts

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