Documentation
¶
Index ¶
- type GroupedMembership
- type TeamMembership
- type User
- func (u User) GroupedMemberships() (groupedMemberships []GroupedMembership, err error)
- func (u User) IsInTeam(teamUUID uuid.UUID) (isInTeam bool, theTeam *team.Team, err error)
- func (u User) Memberships() (teamMemberships []TeamMembership, err error)
- func (u User) OrphanedFingerprints() (orphanedFingerprints []fpr.Fingerprint, err error)
- func (u User) RequestsToJoinTeams() (teamRequests []team.RequestToJoinTeam, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupedMembership ¶
type GroupedMembership struct { Team team.Team Memberships []TeamMembership }
type TeamMembership ¶
TeamMembership records a connection between a Person and a Team. It's possible for several of a user's keys to all be in the same team.
type User ¶
type User struct {
// contains filtered or unexported fields
}
User provides convenience functions around the database, config and teams subdirectory.
func (User) GroupedMemberships ¶
func (u User) GroupedMemberships() (groupedMemberships []GroupedMembership, err error)
GroupedMemberships loads all the teams, loads my fingerprints then returns the intersections grouped by the team uuid.
func (User) IsInTeam ¶
IsInTeam returns true if *any* of the users keys are in the team with the given UUID.
func (User) Memberships ¶
func (u User) Memberships() (teamMemberships []TeamMembership, err error)
Memberships loads all teams, and loads my fingerprints, then returns the intersection. it returns 1 membership (team, fingerprint) for each key that's a member of a team
func (User) OrphanedFingerprints ¶
func (u User) OrphanedFingerprints() (orphanedFingerprints []fpr.Fingerprint, err error)
OrphanedFingerprints loads all fingerprints and returns any that aren't associated with a team nor a request to join a team
func (User) RequestsToJoinTeams ¶
func (u User) RequestsToJoinTeams() (teamRequests []team.RequestToJoinTeam, err error)
RequestsToJoinTeams loads all requests, and loads my fingerprints, then returns the intersection. it returns 1 team.RequestToJoinTeam for each key that's a member of a team