Example golang code with using Vault and Cobra
go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Vladimir Smagin 78b5e35957 users listing hace 4 meses
cmd users listing hace 4 meses
keys users listing hace 4 meses
vendor users listing hace 4 meses
Gopkg.lock users listing hace 4 meses
Gopkg.toml users listing hace 4 meses
README.md import hace 4 meses
main.go import hace 4 meses

README.md

Sample

vlad@turtle:/opt/dev/-go/ssh-vault$ go build && ./ssh-vault import --username=nickd --key-public=keys/nick_diamond.pem.pub --key-secret=keys/nick_diamond.pem --name-first=Nick
Error: required flag(s) "name-last" not set
Usage:
  ssh-vault import [flags]

Flags:
  -h, --help                help for import
  -p, --key-public string   Public key file
  -s, --key-secret string   Secret key file
  -f, --name-first string   First name
  -l, --name-last string    Last name
  -u, --username string     User's login

required flag(s) "name-last" not set
vlad@turtle:/opt/dev/-go/ssh-vault$ go build && ./ssh-vault import --username=nickd --key-public=keys/nick_diamond.pem.pub --key-secret=keys/nick_diamond.pem --name-first=Nick --name-last=Diamond
2019/07/03 02:59:52 Importing key pair
2019/07/03 02:59:53 <nil>
vlad@turtle:/opt/dev/-go/ssh-vault$