Introduce a commercial license option alongside AGPL-3.0-only, require a CLA for contributors, and document the terms in COMMERCIAL.md and NOTICE. Add a script to stamp SPDX headers on Go files and apply it across the tree.
70 lines
4.3 KiB
Go
70 lines
4.3 KiB
Go
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
// SPDX-FileCopyrightText: 2025-2026 Christian Galo
|
|
|
|
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.29.0
|
|
|
|
package discourse
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type Querier interface {
|
|
CreateGroupMapping(ctx context.Context, arg CreateGroupMappingParams) (GroupMapping, error)
|
|
CreateUserLink(ctx context.Context, arg CreateUserLinkParams) (UserLink, error)
|
|
DeleteGroupMapping(ctx context.Context, mappingID string) (int64, error)
|
|
DeleteUserLinkByPersonID(ctx context.Context, personID string) (int64, error)
|
|
// Reverse resolution for oidc/discourseconnect-mode webhook linking.
|
|
FindPersonByOIDCSubject(ctx context.Context, oidcSubject string) (FindPersonByOIDCSubjectRow, error)
|
|
// Reverse resolution for email-mode webhook linking: which person owns this
|
|
// verified primary email. Case-insensitive to match Discourse's own
|
|
// email comparison semantics.
|
|
FindPersonByVerifiedEmail(ctx context.Context, lower string) (FindPersonByVerifiedEmailRow, error)
|
|
GetGroupMappingByDiscourseGroupID(ctx context.Context, discourseGroupID int64) (GroupMapping, error)
|
|
GetGroupMappingByGroupName(ctx context.Context, groupName string) (GroupMapping, error)
|
|
GetGroupMappingByID(ctx context.Context, mappingID string) (GroupMapping, error)
|
|
// Identity attributes linkage resolves against: the OIDC subject (oidc /
|
|
// discourseconnect modes) and the verified primary email (email mode).
|
|
// Reads core via the stream's core_reader grant.
|
|
GetPersonIdentity(ctx context.Context, personID string) (GetPersonIdentityRow, error)
|
|
GetUserLinkByDiscourseUserID(ctx context.Context, discourseUserID int64) (UserLink, error)
|
|
GetUserLinkByPersonID(ctx context.Context, personID string) (UserLink, error)
|
|
InsertObservedGroupMember(ctx context.Context, arg InsertObservedGroupMemberParams) error
|
|
// Targeted-reconcile predicate: is this one person in the desired set?
|
|
IsPersonDesiredForResourceKey(ctx context.Context, arg IsPersonDesiredForResourceKeyParams) (bool, error)
|
|
ListConflictedUserLinks(ctx context.Context) ([]UserLink, error)
|
|
// The convergeable subset of desired: persons with a healthy link.
|
|
// Conflicted links are excluded from convergence by definition.
|
|
ListDesiredLinkedMembers(ctx context.Context, resourceKey string) ([]ListDesiredLinkedMembersRow, error)
|
|
// Desired-state queries: who should be in a managed group. Desired = every
|
|
// person with an active membership in (or ownership of) at least one ACTIVE
|
|
// org any of whose pools currently has the boolean resource key granted —
|
|
// the OR-union across a person's orgs (spec: "Desired state derives from
|
|
// provisions and org-membership union"). Conferral is read from
|
|
// core.boolean_entitlements (materialized from active provisions); neither
|
|
// grants.status nor raw grants are consulted (grants-as-ledger).
|
|
ListDesiredPersonsForResourceKey(ctx context.Context, resourceKey string) ([]string, error)
|
|
// The operator-visible "entitled but unlinked" state (spec: first-class,
|
|
// distinguished from sync errors), also the sweep's linkage worklist.
|
|
ListEntitledUnlinkedPersons(ctx context.Context, resourceKey string) ([]ListEntitledUnlinkedPersonsRow, error)
|
|
ListGroupMappings(ctx context.Context) ([]GroupMapping, error)
|
|
ListGroupMappingsByResourceKey(ctx context.Context, resourceKey string) ([]GroupMapping, error)
|
|
ListObservedGroupMembers(ctx context.Context, mappingID string) ([]ObservedGroupMember, error)
|
|
// The discourse-owned resource keys an operator can map (select options).
|
|
ListOwnedResourceKeys(ctx context.Context) ([]ListOwnedResourceKeysRow, error)
|
|
ListUserLinks(ctx context.Context) ([]UserLink, error)
|
|
RemoveObservedGroupMember(ctx context.Context, arg RemoveObservedGroupMemberParams) (int64, error)
|
|
ReplaceObservedGroupMembersDelete(ctx context.Context, mappingID string) error
|
|
SetUserLinkConflict(ctx context.Context, personID string) (UserLink, error)
|
|
// Quarantine: the linked Discourse user no longer resolves on the forum.
|
|
// Orphaned links leave the convergence desired set (see migration 00003).
|
|
SetUserLinkOrphaned(ctx context.Context, personID string) (UserLink, error)
|
|
// Self-heal: forum-side rename detected — the id-keyed admin record is
|
|
// authoritative for the username, which is only a delivery address.
|
|
UpdateUserLinkUsername(ctx context.Context, arg UpdateUserLinkUsernameParams) (UserLink, error)
|
|
}
|
|
|
|
var _ Querier = (*Queries)(nil)
|