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

admin

package
v1.47.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package admin owns admin credential requirements and secure interactive setup.

Index

Constants

View Source
const CredentialsRequiredMetadata = "admin-credentials-required"

CredentialsRequiredMetadata marks admin operations before command-tree cloning.

Variables

This section is empty.

Functions

func CheckCredentials

func CheckCredentials(command *cli.Command) error

CheckCredentials validates effective admin authentication after input validation.

func ConfigureCredentials

func ConfigureCredentials(root *cli.Command)

ConfigureCredentials marks canonical generated operations before subgroup cloning. Request setup checks credentials after positional and required-input validation.

func ConfigureProjectLifecycle added in v1.41.0

func ConfigureProjectLifecycle(root *cli.Command)

ConfigureProjectLifecycle decorates canonical commands before assembly clones their routes.

func ConfigureSetupHelp

func ConfigureSetupHelp(root *cli.Command)

ConfigureSetupHelp adds the admin guide after clihelp creates help/setup.

func RegisterSetup

func RegisterSetup(root *cli.Command, policy Options)

RegisterSetup installs the secure interactive admin setup command.

func ValidateExternalKeyCreate added in v1.45.0

func ValidateExternalKeyCreate(command *cli.Command, body []byte) error

ValidateExternalKeyCreate checks the selected provider's required fields at the JSON encoding boundary, after flags, piped input, and file values merge. Shared required flags remain generated. The API owns value constraints and purpose-dependent key-version policy; do not require one provider's fields for another or reject future provider types here.

Types

type CredentialsError

type CredentialsError struct {
	// contains filtered or unexported fields
}

CredentialsError provides fixed guidance for missing admin authentication.

func (*CredentialsError) Error

func (err *CredentialsError) Error() string

type Options

type Options struct {
	DefaultRequestOptions func(*cli.Command) []option.RequestOption
	TextOutput            func(*cli.Command) bool
	IsTerminal            func(io.Writer) bool
	DiagnosticsAllowed    func(*cli.Command) bool
}

Options supplies application policies at the existing setup call sites. All callbacks are required by RegisterSetup.

type SetupError

type SetupError struct {
	// contains filtered or unexported fields
}

SetupError preserves a safe setup diagnostic and canonical cancellation cause.

func (*SetupError) Error

func (err *SetupError) Error() string

func (*SetupError) ExitCode

func (err *SetupError) ExitCode() int

func (*SetupError) Unwrap

func (err *SetupError) Unwrap() error

Jump to

Keyboard shortcuts

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