Documentation
¶
Index ¶
- Constants
- Variables
- func AddSecretInteractive(ctx context.Context, secstore securestore.SecretStore) error
- func AskSecret() string
- func AskUser() map[string]string
- func AskUserwithPrevious(Previous map[string]string) map[string]string
- func DeleteSecretInteractive(ctx context.Context, secstore securestore.SecretStore) error
- func GenerateBootstrapToken(ctx context.Context, secstore securestore.SecretStore)
- func GenerateBootstrapTokenList(ctx context.Context, secstore securestore.SecretStore)
- func GenerateServiceToken(ctx context.Context, secstore securestore.SecretStore) string
- func RandomPassword()
- func ReadPin() string
- func ReadUsernamePassword() (string, string)
- func SelectSmartcard() string
- func UpdateSecretInteractive(ctx context.Context, secstore securestore.SecretStore) error
Constants ¶
const AskSecretID = "Enter Secret ID: "
Variables ¶
var SecretFieldNames = []string{"Username", "Credential", "URL", "LastUpdate", "LastUpdateBy", "Comment"}
this package will contain all the functions to interact with the user it will be used by the main.go file
var SecretHumanFieldNames = []string{"Username", "Credential", "URL", "Comment"}
Functions ¶
func AddSecretInteractive ¶
func AddSecretInteractive(ctx context.Context, secstore securestore.SecretStore) error
this function will ask the user an ID and a secret and it will be stored in vault
func AskUser ¶
this function will ask the user to enter the value of the field and return the value as map[string]string
func AskUserwithPrevious ¶
this function will ask the user to enter the value of the field and return the value as map[string]string
func DeleteSecretInteractive ¶
func DeleteSecretInteractive(ctx context.Context, secstore securestore.SecretStore) error
this function will ask the user an ID and it will delete it from vault
func GenerateBootstrapToken ¶ added in v1.0.0
func GenerateBootstrapToken(ctx context.Context, secstore securestore.SecretStore)
this function will create a temporary token that will return the secret once unwrapped
func GenerateBootstrapTokenList ¶ added in v1.0.0
func GenerateBootstrapTokenList(ctx context.Context, secstore securestore.SecretStore)
this function will create a temporary token that will return the lsit of secrets once unwrapped
func GenerateServiceToken ¶ added in v1.0.0
func GenerateServiceToken(ctx context.Context, secstore securestore.SecretStore) string
this function will create a service token, will store it in a cubbyhole entry and will return the wrap token
func RandomPassword ¶ added in v1.0.0
func RandomPassword()
return random password after asking the user for the length and complexity
func ReadUsernamePassword ¶
ask for username and password and return them
func UpdateSecretInteractive ¶
func UpdateSecretInteractive(ctx context.Context, secstore securestore.SecretStore) error
this function will ask the user to enter the secret id and it will search it in vault and allow update it if the secret did not expire
Types ¶
This section is empty.