Documentation
¶
Overview ¶
Package groups implements the Groups domain — cross-type resource organisation.
A Group is a named label that can be assigned to any supported object type (server, secret, database, etc.) for visual organisation. Groups do not convey permissions or tenant boundaries.
Domain boundary: this package must not import backend/infra, backend/platform, or any concrete framework/IO package. Its only allowed dependencies are other domain packages and domain-owned interfaces.
Index ¶
Constants ¶
const ( Collection = "groups" ItemsCollection = "group_items" )
Variables ¶
This section is empty.
Functions ¶
func LoadNamesForObjects ¶
func LoadNamesForObjects(app core.App, objectType ObjectType, objectIDs []string) (map[string][]string, error)
LoadNamesForObjects returns a map of objectID → sorted group names for the given objectType and objectIDs.
Only the provided objectIDs are considered; the returned map contains an entry for every objectID that belongs to at least one group. IDs with no group membership are absent from the result.
Types ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
Group is the aggregate root for the Groups domain. It wraps a PocketBase record and exposes typed domain accessors. Callers should obtain a Group via From and use its methods for all domain-level decisions instead of inspecting raw Record fields directly.
func (*Group) Description ¶
type ObjectType ¶
type ObjectType string
ObjectType identifies the domain type of a group member. Values must match the object_type strings stored in the group_items collection.
const ( ObjectTypeServer ObjectType = "server" ObjectTypeSecret ObjectType = "secret" ObjectTypeEnvGroup ObjectType = "env_group" ObjectTypeDatabase ObjectType = "database" ObjectTypeCloudAccount ObjectType = "cloud_account" ObjectTypeCertificate ObjectType = "certificate" ObjectTypeAIProvider ObjectType = "ai_provider" ObjectTypeConnector ObjectType = "connector" ObjectTypeScript ObjectType = "script" )