queries

package
v0.0.0-...-3b74e67 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcknowledgmentSettingsView

type AcknowledgmentSettingsView struct {
	AcknowledgedUntil     time.Time
	AcknowledgedUntilIANA string
}

type ClubByIDQuery

type ClubByIDQuery struct {
	ID domain.ClubID
}

type ClubBySlugQuery

type ClubBySlugQuery struct {
	Slug string
}

type ClubView

type ClubView struct {
	ID        eventing.AggregateID
	Name      string
	Slug      string
	CreatedAt time.Time
	UpdatedAt time.Time
	// contains filtered or unexported fields
}

func (*ClubView) Query

func (c *ClubView) Query() eventing.JournalQuery

func (*ClubView) Reduce

func (c *ClubView) Reduce(events []*eventing.JournalEvent)

type DescribePendingPersonLinkQuery

type DescribePendingPersonLinkQuery struct {
	LinkToken domain.PersonLinkToken
}

type GatheringPointView

type GatheringPointView struct {
	Location        string
	GatherUntil     time.Time
	GatherUntilIANA string
}

type GetMeLinkedPersonTeamMembershipsView

type GetMeLinkedPersonTeamMembershipsView struct {
	ID           domain.TeamID
	Name         string
	OwningClubID domain.ClubID
	JoinedAt     time.Time
	Role         domain.TeamMemberRole
}

type GetMeLinkedPersonView

type GetMeLinkedPersonView struct {
	ID              domain.PersonID
	FirstName       string
	LastName        string
	LinkedAs        domain.AccountLink
	LinkedAt        time.Time
	LinkedBy        *GetMeOperatorView
	TeamMemberships []*GetMeLinkedPersonTeamMembershipsView
	OwningClubID    domain.ClubID
}

type GetMeOperatorView

type GetMeOperatorView struct {
	FullName string
	// If the operator that performed this account is this account owner.
	IsMe bool
}

type GetMeView

type GetMeView struct {
	ID            domain.AccountID
	Email         string
	FirstName     string
	LastName      string
	LinkedPersons []*GetMeLinkedPersonView
	IsSuper       bool
}

type GetMyTeamHomeQuery

type GetMyTeamHomeQuery struct {
	TeamID domain.TeamID
}

type GetPersonOverviewQuery

type GetPersonOverviewQuery struct {
	ID domain.PersonID
}

type GetTeamOverviewQuery

type GetTeamOverviewQuery struct {
	TeamSlug string
}

type ListClubsQuery

type ListClubsQuery struct{}

type ListClubsView

type ListClubsView struct {
	ID        domain.ClubID
	Name      string
	Slug      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type ListPersonsInClubQuery

type ListPersonsInClubQuery struct {
	OwningClubID domain.ClubID
}

type ListTeamMembersQuery

type ListTeamMembersQuery struct {
	TeamID domain.TeamID
}

type ListTeamMembersTeamMemberView

type ListTeamMembersTeamMemberView struct {
	ID        domain.TeamMemberID
	PersonID  domain.PersonID
	InviterID *domain.PersonID
	Name      string
	Role      domain.TeamMemberRole
	JoinedAt  time.Time
}

type ListTeamMembersView

type ListTeamMembersView struct {
	MembersByPersonID map[domain.PersonID]ListTeamMembersTeamMemberView
}

type ListTeamsQuery

type ListTeamsQuery struct {
	OwningClubID domain.ClubID
}

type ListTeamsTeamView

type ListTeamsTeamView struct {
	ID           domain.TeamID
	Name         string
	Slug         string
	OwningClubID domain.ClubID
	CreatedAt    time.Time
	UpdatedAt    time.Time
}

type ListTeamsView

type ListTeamsView struct {
	Teams []ListTeamsTeamView
}

type MyTeamHomeTrainingView

type MyTeamHomeTrainingView struct {
	ID domain.TrainingID

	ScheduledAt     time.Time
	ScheduledAtIANA string
	EndsAt          time.Time
	EndsAtIANA      string

	GatheringPoint         *GatheringPointView
	AcknowledgmentSettings *AcknowledgmentSettingsView
	RatingSettings         RatingSettingsView

	// Nominations will only be set if enough rights are available.
	Nominations *NominationsView

	Description *string
	Location    *string
	FieldType   *string

	ScheduledBy operatorView
}

type MyTeamHomeView

type MyTeamHomeView struct {
	ID           domain.TeamID
	Name         string
	Trainings    []*MyTeamHomeTrainingView
	OwningClubID domain.ClubID
}

type NominationsView

type NominationsView struct {
	Players []*TrainingNominationResponse
	Staff   []*TrainingNominationResponse
}

type PendingPersonLinkView

type PendingPersonLinkView struct {
	FullName  string
	LinkAs    domain.AccountLink
	InvitedBy operatorView
	Club      *pendingPersonLinkClubView
}

type PersonOverview

type PersonOverview struct {
	ID                  domain.PersonID
	FirstName           string
	LastName            string
	Birthdate           time.Time
	CreatedAt           time.Time
	CreatedBy           operatorView
	LinkedAccounts      []*linkedAccountView
	PendingAccountLinks []*pendingAccountLinkView
	Teams               []*teamView
}

type PersonsInClubView

type PersonsInClubView struct {
	Persons []*personInClubView
}

type PersonsNotInTeamView

type PersonsNotInTeamView struct {
	Persons []PersonsNotInTeamViewPerson
}

type PersonsNotInTeamViewPerson

type PersonsNotInTeamViewPerson struct {
	ID        domain.PersonID
	FirstName string
	LastName  string
}

type PrincipalBySessionTokenQuery

type PrincipalBySessionTokenQuery struct {
	Token domain.SessionToken
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func NewQueries

func NewQueries(
	log *slog.Logger,
	es eventing.EventStore,
	authorizer authz.Authorizer,
	rd rueidis.Client,
	repos domain.Repositories,
) *Queries

func (*Queries) ClubByID

func (q *Queries) ClubByID(ctx context.Context, query ClubByIDQuery) (*ClubView, error)

func (*Queries) ClubBySlug

func (q *Queries) ClubBySlug(ctx context.Context, query ClubBySlugQuery) (*ClubView, error)
func (q *Queries) DescribePendingPersonLink(ctx context.Context, query DescribePendingPersonLinkQuery) (*PendingPersonLinkView, error)

func (*Queries) GetMe

func (q *Queries) GetMe(ctx context.Context) (*GetMeView, error)

func (*Queries) GetMyTeamHome

func (q *Queries) GetMyTeamHome(ctx context.Context, query *GetMyTeamHomeQuery) (*MyTeamHomeView, error)

func (*Queries) GetPersonOverview

func (q *Queries) GetPersonOverview(ctx context.Context, query GetPersonOverviewQuery) (*PersonOverview, error)

func (*Queries) GetTeamOverview

func (q *Queries) GetTeamOverview(ctx context.Context, query GetTeamOverviewQuery) (*TeamOverviewView, error)

func (*Queries) ListClubs

func (q *Queries) ListClubs(ctx context.Context, query ListClubsQuery) ([]*ListClubsView, error)

func (*Queries) ListPersonsInClub

func (q *Queries) ListPersonsInClub(ctx context.Context, query ListPersonsInClubQuery) (*PersonsInClubView, error)

func (*Queries) ListTeamMembers

func (q *Queries) ListTeamMembers(ctx context.Context, query *ListTeamMembersQuery) (*ListTeamMembersView, error)

func (*Queries) ListTeams

func (q *Queries) ListTeams(ctx context.Context, query ListTeamsQuery) (*ListTeamsView, error)

func (*Queries) PrincipalBySessionToken

func (q *Queries) PrincipalBySessionToken(ctx context.Context, query PrincipalBySessionTokenQuery) (*domain.Principal, error)

PrincipalBySessionToken constructs the current authentication principal given a session ID.

func (*Queries) SearchPersonsNotInTeam

func (q *Queries) SearchPersonsNotInTeam(ctx context.Context, query SearchPersonsNotInTeamQuery) (*PersonsNotInTeamView, error)

type RatingSettingsView

type RatingSettingsView struct {
	Policy domain.TrainingRatingPolicy
}

type SearchPersonsNotInTeamQuery

type SearchPersonsNotInTeamQuery struct {
	TeamID domain.TeamID
	Query  string
}

type TeamOverviewView

type TeamOverviewView struct {
	Team struct {
		ID           domain.TeamID
		Name         string
		Slug         string
		OwningClubID domain.ClubID
		CreatedAt    time.Time
		UpdatedAt    time.Time
	}
}

type TrainingNominationResponse

type TrainingNominationResponse struct {
	PersonID       domain.PersonID
	PersonName     string
	Type           domain.TrainingNominationAcknowledgmentType
	AcknowledgedAt *time.Time
	AcceptedAt     *time.Time
	TentativeAt    *time.Time
	DeclinedAt     *time.Time
	AcknowledgedBy *operatorView
	Reason         *string
	NominatedAt    time.Time
}

Jump to

Keyboard shortcuts

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