interactif

package
v0.5.2 Latest Latest
Warning

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

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

Documentation

Index

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

func AskUser() map[string]string

this function will ask the user to enter the value of the field and return the value as map[string]string

func AskUserwithPrevious

func AskUserwithPrevious(Previous map[string]string) map[string]string

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 ReadPin

func ReadPin() string

read user input for smartcard pin

func ReadUsernamePassword

func ReadUsernamePassword() (string, string)

ask for username and password and return them

func SelectSmartcard

func SelectSmartcard() string

select smartcard type

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.

Jump to

Keyboard shortcuts

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