Help us shape the future of Go! Take the 2026 Go Developer Survey

stackit

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrganizationScope registry.Scope = "organization"
	ProjectScope      registry.Scope = "project"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	ServiceAccountKeyPath string
	PrivateKeyPath        string
	Token                 string

	// SDKConfig is the base STACKIT SDK configuration. Per-service clients
	// receive a copy with the appropriate region overridden.
	SDKConfig *stackitconfig.Configuration
}

Credentials holds the loaded service-account material plus a STACKIT SDK Configuration ready to be used with any service client.

func LoadCredentials

func LoadCredentials(saKeyPath, privateKeyPath, token string) (*Credentials, error)

LoadCredentials resolves auth material in the following order:

  1. explicit service-account-key-path
  2. STACKIT_SERVICE_ACCOUNT_KEY_PATH env var
  3. STACKIT_SERVICE_ACCOUNT_TOKEN env var

At least one must produce a valid configuration.

func (*Credentials) SDKConfigForRegion

func (c *Credentials) SDKConfigForRegion(region string) *stackitconfig.Configuration

SDKConfigForRegion returns a copy of the base SDK config with the supplied region applied. Service-specific client constructors accept a *stackitconfig.Configuration directly (see services/* in stackit-sdk-go).

type ListerOpts

type ListerOpts struct {
	OrganizationID string
	ProjectID      string
	Region         string
	Regions        []string
	Credentials    *Credentials
}

ListerOpts is passed to every resource Lister. It carries the current project + region context plus the credential payload needed to build per-service clients on demand.

type Prompt

type Prompt struct {
	Parameters *libnuke.Parameters
	ProjectIDs []string
}

Prompt asks the operator to type the project ID before any destructive action runs. With --no-prompt/--force the prompt is replaced by a sleep matching the value of --prompt-delay.

func (*Prompt) Prompt

func (p *Prompt) Prompt() error

Jump to

Keyboard shortcuts

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