gcloud

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package gcloud provides CLI commands for Google Cloud Secret Manager, exposed as the "suve gcloud secret <op>" command group plus the "suve gcloud stage <op>" staging workflow.

Google Cloud is secret-only (no parameter store). The read/write/tag commands (show, log, list, diff, create, update, delete, tag, untag) and the staging commands reuse the same generic scaffolding as their AWS counterparts via Google Cloud-specific presenters, use cases, and staging strategy.

command.go is this package's subject: the gcloud command group it assembles, together with the vocabulary and hooks its sibling files share. Hence core.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command() *cli.Command

Command returns the gcloud command with the secret subcommand group.

func CreateCommand

func CreateCommand() *cli.Command

CreateCommand returns the Google Cloud Secret Manager create command.

func DeleteCommand

func DeleteCommand() *cli.Command

DeleteCommand returns the Google Cloud Secret Manager delete command.

func DiffCommand

func DiffCommand() *cli.Command

DiffCommand returns the Google Cloud Secret Manager diff command.

func FlatSecretCommand

func FlatSecretCommand(name string) *cli.Command

FlatSecretCommand returns the Google Cloud secret command as a standalone top-level command named `name` (e.g. "secret"). Because there is no parent gcloud group to carry them, it folds in the --project flag and the project-resolving Before hook. Used for the flat `suve secret` alias when Google Cloud is the uniquely active secret provider.

func FlatStageCommand added in v0.8.1

func FlatStageCommand(name string) *cli.Command

FlatStageCommand returns the Google Cloud stage command as a standalone top-level command named `name` (e.g. "stage"). Because there is no parent gcloud group to carry them, it folds in the --project flag and the project-resolving Before hook. Used for the flat `suve stage` alias when Google Cloud is the uniquely active staging provider.

func ListCommand

func ListCommand() *cli.Command

ListCommand returns the Google Cloud Secret Manager list command.

func LogCommand

func LogCommand() *cli.Command

LogCommand returns the Google Cloud Secret Manager log command.

func NewDiffPresenter

func NewDiffPresenter(reader provider.Reader, spec1, spec2 *gcloudversion.Spec) genericdiff.Presenter

NewDiffPresenter builds a Google Cloud diff presenter over the given reader and specs.

func NewLogPresenter

func NewLogPresenter(reader provider.Reader, req genericlog.Request) genericlog.Presenter

NewLogPresenter builds a Google Cloud log presenter over the given reader and request.

func NewShowPresenter

func NewShowPresenter(reader provider.Reader, spec *gcloudversion.Spec) genericshow.Presenter

NewShowPresenter builds a Google Cloud show presenter over the given reader and spec.

func SecretCommand

func SecretCommand() *cli.Command

SecretCommand returns the "gcloud secret" subcommand group.

func ShowCommand

func ShowCommand() *cli.Command

ShowCommand returns the Google Cloud Secret Manager show command.

func StageCommand added in v0.8.1

func StageCommand() *cli.Command

StageCommand returns the "gcloud stage" subcommand group.

func TagCommand

func TagCommand() *cli.Command

TagCommand returns the Google Cloud Secret Manager tag command.

func UntagCommand

func UntagCommand() *cli.Command

UntagCommand returns the Google Cloud Secret Manager untag command.

func UpdateCommand

func UpdateCommand() *cli.Command

UpdateCommand returns the Google Cloud Secret Manager update command.

Types

type CreateOptions

type CreateOptions struct {
	Name        string
	Value       string
	Description string
}

CreateOptions holds the options for the create command.

type CreateRunner

type CreateRunner struct {
	UseCase *gcloud.CreateUseCase
	Stdout  io.Writer
	Stderr  io.Writer
}

CreateRunner executes the create command.

func (*CreateRunner) Run

func (r *CreateRunner) Run(ctx context.Context, opts CreateOptions) error

Run executes the create command.

type DeleteOptions

type DeleteOptions struct {
	Name string
}

DeleteOptions holds the options for the delete command.

type DeleteRunner

type DeleteRunner struct {
	UseCase *gcloud.DeleteUseCase
	Stdout  io.Writer
	Stderr  io.Writer
}

DeleteRunner executes the delete command.

func (*DeleteRunner) Run

func (r *DeleteRunner) Run(ctx context.Context, opts DeleteOptions) error

Run executes the delete command.

type UpdateOptions

type UpdateOptions struct {
	Name        string
	Value       string
	Description string
}

UpdateOptions holds the options for the update command.

type UpdateRunner

type UpdateRunner struct {
	UseCase *gcloud.UpdateUseCase
	Stdout  io.Writer
	Stderr  io.Writer
}

UpdateRunner executes the update command.

func (*UpdateRunner) Run

func (r *UpdateRunner) Run(ctx context.Context, opts UpdateOptions) error

Run executes the update command.

Jump to

Keyboard shortcuts

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