mirror of
https://github.com/UNITRONIX/BetterDesk.git
synced 2026-09-11 01:55:43 +00:00
5a51548ebe
- Updated billing contract structure to support multiple target types (organization, device group, folder, device). - Refactored API handlers to accommodate new billing contract model, including creation, deletion, and listing functionalities. - Enhanced database interactions for billing contracts, ensuring backward compatibility with legacy billing_org_contracts. - Added new billing statistics endpoint to provide insights on active sessions and expiring contracts. - Improved error handling and validation in billing package management.
22 lines
1017 B
Go
22 lines
1017 B
Go
// PanelSyncStore reads device groups, folders, and ACL for RustDesk client sync.
|
|
// Data lives in the consolidated PostgreSQL schema (formerly auth.db / console SQLite).
|
|
package db
|
|
|
|
// PanelSyncStore provides panel device groups, folders, and membership ACL.
|
|
type PanelSyncStore interface {
|
|
GetUserIDByUsername(username string) (int64, error)
|
|
ListPanelDeviceGroups() ([]PanelDeviceGroup, error)
|
|
ListDeviceGroupMemberPeerIDs(deviceGroupID int64) ([]string, error)
|
|
ListDeviceGroupGUIDsForPeer(peerID string) ([]string, error)
|
|
ListUserGroupGUIDsForUser(userID int64) ([]string, error)
|
|
ListUserPeerGrants(userID int64) ([]string, error)
|
|
ListFolders() ([]PanelFolder, error)
|
|
ListFolderAssignments() (map[string]int64, error)
|
|
ListPeerSysinfo() (map[string]ConsolePeerSysinfo, error)
|
|
FolderGroupAccess(folderID int64) ([]string, []string, error)
|
|
DeviceScopeDefaultRestricted() bool
|
|
}
|
|
|
|
// ConsoleAuthDB implements PanelSyncStore for legacy SQLite auth.db deployments.
|
|
var _ PanelSyncStore = (*ConsoleAuthDB)(nil)
|