user

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2019 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

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

type TeamMembership struct {
	Team team.Team
	Me   team.Person
}

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 New

func New(fluidkeysDirectory string, db *database.Database) *User

New initializes a User

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

func (u User) IsInTeam(teamUUID uuid.UUID) (isInTeam bool, theTeam *team.Team, err error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL