Documentation
¶
Index ¶
- func GetCredential(username string) (model.USER_CREDENTIAL, error)
- func GetLastConnectedProfile() (string, error)
- func GetUsernameFromDB() (string, error)
- func GetUsernameFromEnv() string
- func InitDB() (*sql.DB, error)
- func SetCredential(creds model.USER_CREDENTIAL) error
- func SetLastConnectedProfile(profile string) error
- func SetUsernameToDB(username string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCredential ¶ added in v1.1.0
func GetCredential(username string) (model.USER_CREDENTIAL, error)
GetCredential retrieves a VPN user credential from the vpn_user_credential table by profile. It now returns a Credentials struct.
func GetLastConnectedProfile ¶
func GetUsernameFromDB ¶ added in v1.1.0
func GetUsernameFromEnv ¶ added in v1.1.0
func GetUsernameFromEnv() string
Function to prompt the user for a username and store it in an environment variable
func InitDB ¶
initDB initializes the SQLite database and creates the helm_charts table if it doesn't exist.
func SetCredential ¶ added in v1.1.0
func SetCredential(creds model.USER_CREDENTIAL) error
AddCredential adds a new VPN user credential to the vpn_user_credential table. It now takes the profile as an argument and uses the Credentials struct.
func SetLastConnectedProfile ¶
func SetUsernameToDB ¶ added in v1.1.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.