Documentation
¶
Index ¶
Constants ¶
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:
- explicit service-account-key-path
- STACKIT_SERVICE_ACCOUNT_KEY_PATH env var
- 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.