middleware

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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 GetLastConnectedProfile() (string, error)

func GetUsernameFromDB added in v1.1.0

func GetUsernameFromDB() (string, error)

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

func InitDB() (*sql.DB, error)

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 SetLastConnectedProfile(profile string) error

func SetUsernameToDB added in v1.1.0

func SetUsernameToDB(username string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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