hcpvault

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	VAULT_PREFIX           = "hcpvault"
	VAULT_MAIN_DESC        = "Manage Token/Password on Hashicorp Vault"
	VAULT_SUBCOMMAND_NAMES = []string{VAULT_PREFIX + "connect", VAULT_PREFIX + "store", VAULT_PREFIX + "list"}
	VAULT_SUBCOMMAND_DESC  = []string{"Generate HCP API token and connect to Hashicorp Vault", "Store a new secret to Hashicorp Vault", "List HCP Vault secrets log details"}
	VAULT_DISPLAY_COLOR    = "#FFDE59"
)

Functions

func Connect

func Connect() string

func ConnectUI added in v1.1.0

func ConnectUI() string

func Create

func Create(name, value string) string

func List

func List() string

func ListAppSec

func ListAppSec(orgID, projID, appName, token string) string

func ListUI added in v1.1.0

func ListUI() string

func StoreUI added in v1.1.0

func StoreUI(userInput string) string

Types

type CreatedBy

type CreatedBy struct {
	Name  string `json:"name"`
	Type  string `json:"type"`
	Email string `json:"email"`
}

type Location

type Location struct {
	Provider string `json:"provider"`
	Region   string `json:"region"`
}

type Secret

type Secret struct {
	Name          string     `json:"name"`
	Version       Version    `json:"version"`
	CreatedAt     string     `json:"created_at"`
	CreatedBy     CreatedBy  `json:"created_by"`
	LatestVersion string     `json:"latest_version"`
	SyncStatus    SyncStatus `json:"sync_status"`
}

type SecretBody

type SecretBody struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type SecretsResponse

type SecretsResponse struct {
	Secrets []Secret `json:"secrets"`
}

type SyncStatus

type SyncStatus struct {
	VersionCount string `json:"version_count"`
}

type TokenResponse

type TokenResponse struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
	ExpiresIn   int    `json:"expires_in"`
}

type Version

type Version struct {
	Version string `json:"version"`
	Type    string `json:"type"`
}

Jump to

Keyboard shortcuts

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