cmd

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

README

cmd

Light wrappers around the basic sopstool package commands using the cobra package

This package, by itself, isn't that useful - the ../main.go requires this.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildCommit string

BuildCommit (updated by main)

View Source
var BuildDate string

BuildDate (updated by main)

View Source
var BuildVersion string

BuildVersion (updated by main)

View Source
var RootCmd = &cobra.Command{
	Use:   "sopstool",
	Short: "Wrapper around sops for multiple files",
	Long: `sopstool

	sops wrapper supporting multiple files and helper commands.`,
}

RootCmd represents the base command when called without any subcommands

Functions

func AddCommand

func AddCommand(_ *cobra.Command, args []string) error

AddCommand the command for the add command

func CatCommand

func CatCommand(_ *cobra.Command, args []string) error

CatCommand prints a file to stdout

func CleanCommand

func CleanCommand(_ *cobra.Command, args []string) error

CleanCommand cleans up files

func CompletionCommand

func CompletionCommand(_ *cobra.Command, _ []string) error

CompletionCommand the command for the add command

func DecryptCommand

func DecryptCommand(_ *cobra.Command, args []string) error

DecryptCommand decrypts files

func DocsCommand

func DocsCommand(_ *cobra.Command, _ []string) error

DocsCommand the command for the add command

func EditCommand

func EditCommand(_ *cobra.Command, args []string) error

EditCommand edit a file

func EntrypointCommand

func EntrypointCommand(cmd *cobra.Command, args []string) (rerr error)

EntrypointCommand the command for the add command Note the named return parameter, it is used to tack on errors during the deferred encrypted file cleanup.

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ListCommand

func ListCommand(_ *cobra.Command, _ []string)

ListCommand the command for the list command

func RemoveCommand

func RemoveCommand(_ *cobra.Command, args []string) error

RemoveCommand the command for the add command

func RotateCommand

func RotateCommand(_ *cobra.Command, args []string) error

RotateCommand Rotates up files

func UpdateKeysCommand added in v1.1.0

func UpdateKeysCommand(_ *cobra.Command, args []string) error

UpdateKeysCommand updates recipients keys

func VersionCommand

func VersionCommand(_ *cobra.Command, _ []string)

VersionCommand prints the version

Types

This section is empty.

Jump to

Keyboard shortcuts

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