vault

package
v1.5.22 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package vault

Copyright © 2023 zcubbs https://github.com/zcubbs

Package vault

Copyright © 2023 zcubbs https://github.com/zcubbs

Package vault

Copyright © 2023 zcubbs https://github.com/zcubbs

Index

Constants

This section is empty.

Variables

View Source
var Add = &cobra.Command{
	Use:   "add",
	Short: "Add vault secret",
	Long:  ``,
	Run: func(cmd *cobra.Command, args []string) {
		err := addSecret()
		if err != nil {
			fmt.Println(err)
		}
	},
}

Add represents the os command

View Source
var Cmd = &cobra.Command{
	Use:   "vault",
	Short: "Vault Helper Commands",
	Long:  ``,
	Run: func(cmd *cobra.Command, args []string) {
		err := cmd.Help()
		if err != nil {
			fmt.Println(err)
		}
	},
}

Cmd represents the os command

View Source
var Get = &cobra.Command{
	Use:   "get",
	Short: "Get vault secret",
	Long:  ``,
	Run: func(cmd *cobra.Command, args []string) {
		secretValue, err := GetSecret(getSecretKey)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}

		fmt.Println(secretValue)
	},
}

Get represents the os command

Functions

func GetSecret added in v1.3.0

func GetSecret(key string) (string, error)

Types

type Config added in v1.3.0

type Config struct {
	VaultKey  string `yaml:"vault_key"`
	VaultFile string `yaml:"vault_file"`
}

Config represents the YAML configuration file

Jump to

Keyboard shortcuts

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