add client and groups member logic

This commit is contained in:
2026-03-27 18:49:45 +01:00
parent a95bc43be6
commit c5fc74d142
9 changed files with 256 additions and 70 deletions
+7 -2
View File
@@ -42,7 +42,7 @@ func CacheGetClientByName(name string) (*Client, error) {
return nil, fmt.Errorf("client %s not found", name)
}
func CacheSetClient(client *Client) {
func CacheSaveClient(client *Client) {
mu.Lock()
defer mu.Unlock()
@@ -56,7 +56,12 @@ func CacheDeleteClient(id uint32) {
delete(CacheClients, id)
}
func CacheSetGroup() {}
func CacheSaveGroup(group *Group) {
mu.Lock()
defer mu.Unlock()
Groups[group.Id] = group
}
func CacheGetGroup(id uint32) (*Group, error) {
mu.RLock()