Files
UNITRONIX 5a51548ebe feat(billing): refactor billing contract management and enhance API
- 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.
2026-07-09 06:39:25 +02:00

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)