initial commit

This commit is contained in:
Shamil Nunhuck
2025-11-08 10:18:19 +00:00
commit 920a79b2e9
25 changed files with 1523 additions and 0 deletions

21
internal/http/util.go Normal file
View File

@@ -0,0 +1,21 @@
package http
func hasAnyGroup(user map[string]struct{}, want []string) bool {
if len(want) == 0 {
return false
}
for _, g := range want {
if _, ok := user[g]; ok {
return true
}
}
return false
}
func toSet(ss []string) map[string]struct{} {
m := make(map[string]struct{}, len(ss))
for _, s := range ss {
m[s] = struct{}{}
}
return m
}