Documentation
¶
Index ¶
- func AddAccount(account models.Account) (int, error)
- func AddUnit(uuid string, ipaddr string) error
- func AddUnitGroup(group models.UnitGroup) (int, error)
- func DeleteAccount(accountID string) error
- func DeleteUnit(uuid string) error
- func DeleteUnitGroup(groupID int) error
- func GetAccount(accountID string) ([]models.Account, error)
- func GetAccounts() ([]models.Account, error)
- func GetFreeIP() string
- func GetPassword(accountUsername string) string
- func GetRecoveryCodes(username string) []string
- func GetUnit(uuid string) (map[string]interface{}, error)
- func GetUnitCredentials(uuid string) (string, string, error)
- func GetUnitGroup(groupID int) (models.UnitGroup, error)
- func GetUnitInfo(uuid string) map[string]interface{}
- func GetUserOtpSecret(username string) string
- func GetUserUnits() map[string][]string
- func Init() *pgxpool.Pool
- func InitReportDb() (*pgxpool.Pool, context.Context)
- func Is2FAEnabled(username string) bool
- func IsAdmin(accountUsername string) bool
- func IsUnitGroupUsed(groupID int) (bool, error)
- func ListConnectedUnits() ([]string, error)
- func ListUnitGroups() ([]models.UnitGroup, error)
- func ListUnits() ([]map[string]interface{}, error)
- func LoadAdminUsersList() ([]string, error)
- func LoadUserUnitsMap() (map[string][]string, error)
- func ReloadACLs()
- func ReportInstance() (*pgxpool.Pool, context.Context)
- func SetUnitAddress(uuid string, ipaddr string) error
- func SetUnitCredentials(uuid string, username string, password string) error
- func SetUnitInfo(uuid string, info models.UnitInfo) error
- func SetUserOtpSecret(username string, secret string) error
- func SetUserRecoveryCodes(username string, codes []string) error
- func UnitExists(uuid string) (bool, error)
- func UnitGroupExists(groupID int) (bool, error)
- func UpdateAccount(accountID string, account models.AccountUpdate) error
- func UpdatePassword(accountUsername string, newPassword string) error
- func UpdateUnitGroup(groupId int, group models.UnitGroup) error
- func UpdateUnitVpnStatus(uuid string, connectedSince int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAccount ¶
Refactored user functions to use PostgreSQL
func AddUnitGroup ¶
AddUnitGroup adds a new unit group. Only admin can execute.
func DeleteAccount ¶
func DeleteUnit ¶
func DeleteUnitGroup ¶
func GetAccounts ¶
func GetPassword ¶
func GetRecoveryCodes ¶
func GetUnitInfo ¶
func GetUserOtpSecret ¶
func GetUserUnits ¶
func Is2FAEnabled ¶
func IsUnitGroupUsed ¶
func ListConnectedUnits ¶
func ListUnitGroups ¶
func LoadAdminUsersList ¶
func LoadUserUnitsMap ¶
func ReloadACLs ¶
func ReloadACLs()
func SetUnitAddress ¶
func SetUnitCredentials ¶
func SetUserOtpSecret ¶
func SetUserRecoveryCodes ¶
func UnitExists ¶
func UnitGroupExists ¶
func UpdateAccount ¶
func UpdateAccount(accountID string, account models.AccountUpdate) error
func UpdatePassword ¶
func UpdateUnitVpnStatus ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.