Documentation
¶
Index ¶
- Constants
- Variables
- func AddSecretInteractive(ctx context.Context, secstore securestore.SecretStore) error
- func AskUser() map[string]string
- func AskUserwithPrevious(Previous map[string]string) map[string]string
- func DeleteSecretInteractive(ctx context.Context, secstore securestore.SecretStore) error
- func ReadPin() string
- func ReadUsernamePassword() (string, string)
- func SelectSmartcard() string
- func UpdateSecretInteractive(ctx context.Context, secstore securestore.SecretStore) error
Constants ¶
View Source
const AskSecretID = "Enter Secret ID: "
Variables ¶
View Source
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
View Source
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
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.
Click to show internal directories.
Click to hide internal directories.