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

internal

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package internal holds the Google Cloud project context, store and staging-scope wiring that the gcloud command group, its secret package and its stage commands share.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmTarget

func ConfirmTarget(ctx context.Context) string

ConfirmTarget describes the Google Cloud project for a confirmation prompt ("project my-project"). It returns "" when no project was resolved, so the prompt shows no target line.

func SecretStore

func SecretStore(ctx context.Context) (provider.Store, error)

SecretStore resolves a provider.Store for the Google Cloud Secret Manager service. The project id is read from the context (see WithProject); it returns a clear error when no project could be resolved.

func StagingScopeResolver

func StagingScopeResolver(ctx context.Context) (staging.ResolvedScope, error)

StagingScopeResolver resolves the Google Cloud staging scope from the project stashed in the context (see WithProject). It performs no network calls. It satisfies staging.ScopeResolver.

func WithProject

func WithProject(ctx context.Context, project string) context.Context

WithProject returns a context carrying the resolved Google Cloud project id. The gcloud command group sets it once (from --project or the GOOGLE_CLOUD_PROJECT env) so every gcloud subcommand can resolve a store without threading the flag through the generic command Config.

Types

This section is empty.

Jump to

Keyboard shortcuts

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