Documentation
¶
Index ¶
- Constants
- Variables
- func CheckRuntimeCompatibility(ctx context.Context, database runtimeQueryRower) error
- func Migrate(ctx context.Context, conn *pgx.Conn) error
- func ValidBrowserSession(secret string) bool
- type APIToken
- type Actor
- type AddGroupMembershipParams
- type AuditEvent
- type AuditListOptions
- type AuditPage
- type AuditRecord
- type AuthenticateTokenParams
- type AuthenticateTokenRow
- type AuthorizationDecision
- type AuthorizationDenialInput
- type AuthorizeRRsetBatchParams
- type AuthorizeRRsetBatchRow
- type BootstrapInput
- type BootstrapResult
- type BrowseChange
- type BrowseChangeClaim
- type BrowseClaim
- type BrowseOptions
- type BrowsePage
- type BrowseRrset
- type BrowseWorker
- type BrowseZone
- type BrowserSession
- type CloseOverdueDNSIntentsParams
- type CreateAPITokenParams
- type CreateAPITokenRow
- type CreateBrowserSessionParams
- type CreateDelegationChangeKindParams
- type CreateDelegationParams
- type CreateDelegationRecordTypeParams
- type CreateDelegationSelectorParams
- type CreateGroupParams
- type CreateIdentityParams
- type CreateOperatorIdentityParams
- type CreateZoneBindingParams
- type CreatedBrowserSession
- type CreatedToken
- type DBTX
- type DNSIntent
- type DNSIntentInput
- type DNSOutcome
- type DNSOutcomeInput
- type Delegation
- type DelegationChangeKind
- type DelegationCreate
- type DelegationDetails
- type DelegationListOptions
- type DelegationPage
- type DelegationRecordType
- type DelegationSelector
- type DelegationSelectorInput
- type DeniedRRsetTuple
- type GetAPITokenMetadataParams
- type GetAPITokenMetadataRow
- type GetActiveZoneBindingByUpstreamZoneIDForUpdateParams
- type GetAuditEventByIDRow
- type GetBootstrapStateRow
- type GetBrowseZoneParams
- type GetDNSOutcomeByOperationIDRow
- type GetDelegationDetailsRow
- type GetGroupMembershipParams
- type GetInstallationMetadataRow
- type GetZoneDeletionReconciliationStateRow
- type Group
- type GroupCreate
- type GroupListOptions
- type GroupMembership
- type GroupPage
- type GroupPatch
- type Identity
- type IdentityCreate
- type IdentityListOptions
- type IdentityPage
- type IdentityPatch
- type InsertAuthorizationDeniedAuditParams
- type InsertAuthorizationDeniedAuditRow
- type InsertDNSIntentParams
- type InsertDNSIntentRow
- type InsertDNSOutcomeParams
- type InsertManagementAuditParams
- type InsertManagementAuditRow
- type InstallationMetadata
- type ListAPITokensParams
- type ListAPITokensRow
- type ListActiveZoneBindingCandidatesParams
- type ListAuditRecordsParams
- type ListAuditRecordsRow
- type ListBrowseRRsetsByTypeParams
- type ListBrowseRRsetsByTypeRow
- type ListBrowseRRsetsParams
- type ListBrowseRRsetsRow
- type ListDelegationDetailsParams
- type ListDelegationDetailsRow
- type ListEffectiveDelegationDetailsParams
- type ListEffectiveDelegationDetailsRow
- type ListGroupMembersParams
- type ListGroupsParams
- type ListIdentitiesParams
- type ListIdentityAssignmentDetailsParams
- type ListIdentityAssignmentDetailsRow
- type ListIdentityGroupsParams
- type ListZoneBindingsParams
- type NextZoneBindingGenerationParams
- type NullableStringPatch
- type OperatorCredential
- type OperatorGuard
- type OperatorRecoveryInput
- type Queries
- func (q *Queries) AddGroupMembership(ctx context.Context, arg AddGroupMembershipParams) (int64, error)
- func (q *Queries) AuthenticateToken(ctx context.Context, arg AuthenticateTokenParams) (AuthenticateTokenRow, error)
- func (q *Queries) AuthorizeRRsetBatch(ctx context.Context, arg AuthorizeRRsetBatchParams) ([]AuthorizeRRsetBatchRow, error)
- func (q *Queries) BrowseHasPending(ctx context.Context, zone string) (bool, error)
- func (q *Queries) CloseOverdueDNSIntents(ctx context.Context, arg CloseOverdueDNSIntentsParams) ([]string, error)
- func (q *Queries) CountEnabledOperators(ctx context.Context) (int64, error)
- func (q *Queries) CreateAPIToken(ctx context.Context, arg CreateAPITokenParams) (CreateAPITokenRow, error)
- func (q *Queries) CreateBrowserSession(ctx context.Context, arg CreateBrowserSessionParams) (pgtype.Timestamptz, error)
- func (q *Queries) CreateDelegation(ctx context.Context, arg CreateDelegationParams) (Delegation, error)
- func (q *Queries) CreateDelegationChangeKind(ctx context.Context, arg CreateDelegationChangeKindParams) error
- func (q *Queries) CreateDelegationRecordType(ctx context.Context, arg CreateDelegationRecordTypeParams) error
- func (q *Queries) CreateDelegationSelector(ctx context.Context, arg CreateDelegationSelectorParams) error
- func (q *Queries) CreateGroup(ctx context.Context, arg CreateGroupParams) (Group, error)
- func (q *Queries) CreateIdentity(ctx context.Context, arg CreateIdentityParams) (Identity, error)
- func (q *Queries) CreateInstallationMetadata(ctx context.Context, installationID string) (InstallationMetadata, error)
- func (q *Queries) CreateOperatorIdentity(ctx context.Context, arg CreateOperatorIdentityParams) (Identity, error)
- func (q *Queries) CreateZoneBinding(ctx context.Context, arg CreateZoneBindingParams) (ZoneBinding, error)
- func (q *Queries) DeleteBrowserSession(ctx context.Context, digest []byte) error
- func (q *Queries) DeleteExpiredBrowserSessions(ctx context.Context) error
- func (q *Queries) FinalizeInstallationRestore(ctx context.Context) (InstallationMetadata, error)
- func (q *Queries) GetAPITokenMetadata(ctx context.Context, arg GetAPITokenMetadataParams) (GetAPITokenMetadataRow, error)
- func (q *Queries) GetActiveZoneBindingByUpstreamZoneIDForUpdate(ctx context.Context, arg GetActiveZoneBindingByUpstreamZoneIDForUpdateParams) (ZoneBinding, error)
- func (q *Queries) GetAuditEventByID(ctx context.Context, id string) (GetAuditEventByIDRow, error)
- func (q *Queries) GetBootstrapState(ctx context.Context) (GetBootstrapStateRow, error)
- func (q *Queries) GetBrowseZone(ctx context.Context, arg GetBrowseZoneParams) (BrowseZone, error)
- func (q *Queries) GetDNSOutcomeByOperationID(ctx context.Context, operationID string) (GetDNSOutcomeByOperationIDRow, error)
- func (q *Queries) GetDelegationByID(ctx context.Context, id string) (Delegation, error)
- func (q *Queries) GetDelegationDetails(ctx context.Context, id string) (GetDelegationDetailsRow, error)
- func (q *Queries) GetDelegationForUpdate(ctx context.Context, id string) (Delegation, error)
- func (q *Queries) GetGroupByID(ctx context.Context, id string) (Group, error)
- func (q *Queries) GetGroupForUpdate(ctx context.Context, id string) (Group, error)
- func (q *Queries) GetGroupMembership(ctx context.Context, arg GetGroupMembershipParams) (GroupMembership, error)
- func (q *Queries) GetIdentityByHandleForUpdate(ctx context.Context, handle string) (Identity, error)
- func (q *Queries) GetIdentityByID(ctx context.Context, id string) (Identity, error)
- func (q *Queries) GetIdentityForUpdate(ctx context.Context, id string) (Identity, error)
- func (q *Queries) GetInstallationMetadata(ctx context.Context) (GetInstallationMetadataRow, error)
- func (q *Queries) GetZoneBindingByID(ctx context.Context, id string) (ZoneBinding, error)
- func (q *Queries) GetZoneBindingForUpdate(ctx context.Context, id string) (ZoneBinding, error)
- func (q *Queries) GetZoneDeletionReconciliationState(ctx context.Context, bindingID string) (GetZoneDeletionReconciliationStateRow, error)
- func (q *Queries) InsertAuthorizationDeniedAudit(ctx context.Context, arg InsertAuthorizationDeniedAuditParams) (InsertAuthorizationDeniedAuditRow, error)
- func (q *Queries) InsertDNSIntent(ctx context.Context, arg InsertDNSIntentParams) (InsertDNSIntentRow, error)
- func (q *Queries) InsertDNSOutcome(ctx context.Context, arg InsertDNSOutcomeParams) (int64, error)
- func (q *Queries) InsertManagementAudit(ctx context.Context, arg InsertManagementAuditParams) (InsertManagementAuditRow, error)
- func (q *Queries) ListAPITokens(ctx context.Context, arg ListAPITokensParams) ([]ListAPITokensRow, error)
- func (q *Queries) ListActiveZoneBindingCandidates(ctx context.Context, arg ListActiveZoneBindingCandidatesParams) ([]ZoneBinding, error)
- func (q *Queries) ListAuditRecords(ctx context.Context, arg ListAuditRecordsParams) ([]ListAuditRecordsRow, error)
- func (q *Queries) ListBrowseRRsets(ctx context.Context, arg ListBrowseRRsetsParams) ([]ListBrowseRRsetsRow, error)
- func (q *Queries) ListBrowseRRsetsByType(ctx context.Context, arg ListBrowseRRsetsByTypeParams) ([]ListBrowseRRsetsByTypeRow, error)
- func (q *Queries) ListDelegationChangeKindsByIDs(ctx context.Context, delegationIds []string) ([]DelegationChangeKind, error)
- func (q *Queries) ListDelegationDetails(ctx context.Context, arg ListDelegationDetailsParams) ([]ListDelegationDetailsRow, error)
- func (q *Queries) ListDelegationRecordTypesByIDs(ctx context.Context, delegationIds []string) ([]DelegationRecordType, error)
- func (q *Queries) ListDelegationSelectorsByIDs(ctx context.Context, delegationIds []string) ([]DelegationSelector, error)
- func (q *Queries) ListEffectiveDelegationDetails(ctx context.Context, arg ListEffectiveDelegationDetailsParams) ([]ListEffectiveDelegationDetailsRow, error)
- func (q *Queries) ListGroupMembers(ctx context.Context, arg ListGroupMembersParams) ([]Identity, error)
- func (q *Queries) ListGroups(ctx context.Context, arg ListGroupsParams) ([]Group, error)
- func (q *Queries) ListIdentities(ctx context.Context, arg ListIdentitiesParams) ([]Identity, error)
- func (q *Queries) ListIdentityAssignmentDetails(ctx context.Context, arg ListIdentityAssignmentDetailsParams) ([]ListIdentityAssignmentDetailsRow, error)
- func (q *Queries) ListIdentityGroups(ctx context.Context, arg ListIdentityGroupsParams) ([]Group, error)
- func (q *Queries) ListZoneBindings(ctx context.Context, arg ListZoneBindingsParams) ([]ZoneBinding, error)
- func (q *Queries) LockOperatorGuard(ctx context.Context) (bool, error)
- func (q *Queries) LockZoneBindingKey(ctx context.Context, hashtext string) error
- func (q *Queries) NextZoneBindingGeneration(ctx context.Context, arg NextZoneBindingGenerationParams) (int64, error)
- func (q *Queries) RemoveGroupMembership(ctx context.Context, arg RemoveGroupMembershipParams) (int64, error)
- func (q *Queries) RequestBrowseRefresh(ctx context.Context, id string) error
- func (q *Queries) RetireZoneBinding(ctx context.Context, arg RetireZoneBindingParams) (ZoneBinding, error)
- func (q *Queries) RevokeAPIToken(ctx context.Context, arg RevokeAPITokenParams) (RevokeAPITokenRow, error)
- func (q *Queries) RevokeAllActiveAPITokens(ctx context.Context) (int64, error)
- func (q *Queries) RevokeDelegation(ctx context.Context, arg RevokeDelegationParams) (Delegation, error)
- func (q *Queries) RevokeDelegationsForZoneDeletion(ctx context.Context, arg RevokeDelegationsForZoneDeletionParams) ([]string, error)
- func (q *Queries) TouchBrowseZone(ctx context.Context, arg TouchBrowseZoneParams) (BrowseZone, error)
- func (q *Queries) UpdateGroup(ctx context.Context, arg UpdateGroupParams) (Group, error)
- func (q *Queries) UpdateIdentity(ctx context.Context, arg UpdateIdentityParams) (Identity, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- func (q *Queries) ZoneBindingHistoryExists(ctx context.Context, arg ZoneBindingHistoryExistsParams) (bool, error)
- type RRsetTuple
- type RemoveGroupMembershipParams
- type RestoreFinalizationInput
- type RetainedAssignment
- type RetainedAssignmentPage
- type RetireZoneBindingParams
- type RevokeAPITokenParams
- type RevokeAPITokenRow
- type RevokeDelegationParams
- type RevokeDelegationsForZoneDeletionParams
- type RuntimePoolConfig
- type RuntimePoolConfigurationSet
- type RuntimePools
- type SchemaStatus
- type Store
- func (s *Store) AddGroupMember(ctx context.Context, actor Actor, groupID, identityID string) (GroupMembership, error)
- func (s *Store) Authenticate(ctx context.Context, token string) (Actor, error)
- func (s *Store) AuthorizeRRsetBatch(ctx context.Context, token, requestID, upstream, powerDNSZoneID string, ...) (AuthorizationDecision, error)
- func (s *Store) BindCreatedZone(ctx context.Context, actor Actor, input ZoneBindingInput) (ZoneBinding, error)
- func (s *Store) Bootstrap(ctx context.Context, input BootstrapInput) (BootstrapResult, error)
- func (s *Store) BrowseRRsets(ctx context.Context, actor Actor, upstream, zoneID string, ...) (BrowsePage, error)
- func (s *Store) ClaimBrowseChange(ctx context.Context, upstream string) (BrowseChangeClaim, error)
- func (s *Store) ClaimBrowseFull(ctx context.Context, upstream string) (BrowseClaim, error)
- func (s *Store) CleanupBrowseRows(ctx context.Context, zone string) (int64, error)
- func (s *Store) CloseOverdueDNSIntents(ctx context.Context, requestedLimit int) (int, error)
- func (s *Store) ConfirmZoneBindingAbsent(ctx context.Context, actor Actor, bindingID string) (ZoneBinding, error)
- func (s *Store) CreateBrowserSession(ctx context.Context, token, previous string) (CreatedBrowserSession, error)
- func (s *Store) CreateDNSIntent(ctx context.Context, actor Actor, input DNSIntentInput) (DNSIntent, error)
- func (s *Store) CreateDelegation(ctx context.Context, actor Actor, input DelegationCreate) (DelegationDetails, error)
- func (s *Store) CreateGroup(ctx context.Context, actor Actor, input GroupCreate) (Group, error)
- func (s *Store) CreateIdentity(ctx context.Context, actor Actor, input IdentityCreate) (Identity, error)
- func (s *Store) CreateToken(ctx context.Context, actor Actor, identityID string, input TokenCreate) (CreatedToken, error)
- func (s *Store) DeleteBrowserSession(ctx context.Context, secret string) error
- func (s *Store) EnsureZoneBinding(ctx context.Context, actor Actor, input ZoneBindingInput) (ZoneBinding, error)
- func (s *Store) FailBrowseChange(ctx context.Context, c BrowseChangeClaim) error
- func (s *Store) FailBrowseFull(ctx context.Context, c BrowseClaim) error
- func (s *Store) FinalizeRestore(ctx context.Context, input RestoreFinalizationInput) (OperatorCredential, error)
- func (s *Store) GetCurrentIdentity(ctx context.Context, actor Actor) (Identity, error)
- func (s *Store) GetDelegation(ctx context.Context, actor Actor, id string) (DelegationDetails, error)
- func (s *Store) GetGroup(ctx context.Context, actor Actor, id string) (Group, error)
- func (s *Store) GetIdentity(ctx context.Context, actor Actor, id string) (Identity, error)
- func (s *Store) GetZoneBinding(ctx context.Context, actor Actor, id string) (ZoneBinding, error)
- func (s *Store) GetZoneBindingRecovery(ctx context.Context, actor Actor, bindingID string) (ZoneBindingRecovery, error)
- func (s *Store) ListAuditEvents(ctx context.Context, actor Actor, options AuditListOptions) (AuditPage, error)
- func (s *Store) ListCurrentIdentityDelegations(ctx context.Context, actor Actor, options DelegationListOptions) (DelegationPage, error)
- func (s *Store) ListCurrentIdentityGroups(ctx context.Context, actor Actor, options GroupListOptions) (GroupPage, error)
- func (s *Store) ListDelegations(ctx context.Context, actor Actor, options DelegationListOptions) (DelegationPage, error)
- func (s *Store) ListGroupMembers(ctx context.Context, actor Actor, groupID string, options IdentityListOptions) (IdentityPage, error)
- func (s *Store) ListGroups(ctx context.Context, actor Actor, options GroupListOptions) (GroupPage, error)
- func (s *Store) ListIdentities(ctx context.Context, actor Actor, options IdentityListOptions) (IdentityPage, error)
- func (s *Store) ListIdentityAssignments(ctx context.Context, actor Actor, identityID string, ...) (RetainedAssignmentPage, error)
- func (s *Store) ListIdentityDelegations(ctx context.Context, actor Actor, identityID string, ...) (DelegationPage, error)
- func (s *Store) ListIdentityGroups(ctx context.Context, actor Actor, identityID string, options GroupListOptions) (GroupPage, error)
- func (s *Store) ListTokens(ctx context.Context, actor Actor, identityID string, options TokenListOptions) (TokenPage, error)
- func (s *Store) ListZoneBindings(ctx context.Context, actor Actor, options ZoneBindingListOptions) (ZoneBindingPage, error)
- func (s *Store) ObserveZoneBinding(ctx context.Context, actor Actor, input ZoneObservationInput) (ZoneObservation, error)
- func (s *Store) PatchGroup(ctx context.Context, actor Actor, id string, patch GroupPatch) (Group, error)
- func (s *Store) PatchIdentity(ctx context.Context, actor Actor, id string, patch IdentityPatch) (Identity, error)
- func (s *Store) PrepareZoneDeletion(ctx context.Context, actor Actor, input ZoneDeletionInput) (ZoneDeletionPlan, error)
- func (s *Store) PrepareZoneDeletionByUpstreamZoneID(ctx context.Context, actor Actor, input ZoneDeletionByUpstreamInput) (ZoneDeletionPlan, error)
- func (s *Store) PrepareZoneDeletionRetry(ctx context.Context, actor Actor, input ZoneDeletionInput) (ZoneDeletionPlan, error)
- func (s *Store) ProbeAuditPersistence(ctx context.Context) error
- func (s *Store) PublishBrowseChange(ctx context.Context, c BrowseChangeClaim, sets []json.RawMessage) error
- func (s *Store) PublishBrowseFull(ctx context.Context, c BrowseClaim) error
- func (s *Store) RebindZoneBinding(ctx context.Context, actor Actor, retiredBindingID string, ...) (ZoneBinding, error)
- func (s *Store) RecordAuthorizationDenial(ctx context.Context, actor Actor, input AuthorizationDenialInput) error
- func (s *Store) RecordDNSOutcome(ctx context.Context, input DNSOutcomeInput) (DNSOutcome, error)
- func (s *Store) RecordZoneDeletionOutcome(ctx context.Context, plan ZoneDeletionPlan, input ZoneDeletionOutcomeInput) (DNSOutcome, error)
- func (s *Store) RecoverOperator(ctx context.Context, input OperatorRecoveryInput) (OperatorCredential, error)
- func (s *Store) RemoveGroupMember(ctx context.Context, actor Actor, groupID, identityID string) error
- func (s *Store) RenewBrowseFull(ctx context.Context, c BrowseClaim) error
- func (s *Store) RevokeDelegation(ctx context.Context, actor Actor, id string) error
- func (s *Store) RevokeToken(ctx context.Context, actor Actor, identityID, tokenID string) error
- func (s *Store) StageBrowseRRsets(ctx context.Context, c BrowseClaim, sets []json.RawMessage) error
- func (s *Store) WriteAuditNDJSON(ctx context.Context, actor Actor, options AuditListOptions, output io.Writer) error
- type TokenCreate
- type TokenListOptions
- type TokenMetadata
- type TokenPage
- type TouchBrowseZoneParams
- type UpdateGroupParams
- type UpdateIdentityParams
- type ZoneBinding
- type ZoneBindingHistoryExistsParams
- type ZoneBindingInput
- type ZoneBindingListOptions
- type ZoneBindingPage
- type ZoneBindingRecovery
- type ZoneDeletionByUpstreamInput
- type ZoneDeletionInput
- type ZoneDeletionOutcomeInput
- type ZoneDeletionPlan
- type ZoneDeletionResult
- type ZoneObservation
- type ZoneObservationInput
Constants ¶
const MaxRRsetBatch = 100
Variables ¶
var ( ErrUnsupportedPostgreSQL = errors.New("database: unsupported PostgreSQL version") ErrReadOnlyDatabase = errors.New("database: primary is not writable") ErrIncompatibleSchema = errors.New("database: incompatible schema") )
var ( // ErrUnauthenticated reports an unusable credential without disclosing why. ErrUnauthenticated = errors.New("database: unauthenticated") // ErrForbidden reports an authenticated actor lacking current authority. ErrForbidden = errors.New("database: forbidden") // ErrNotFound reports a resource that is not visible or does not exist. ErrNotFound = errors.New("database: not found") // ErrConflict reports a request conflicting with current durable state. ErrConflict = errors.New("database: conflict") // ErrInvalid reports invalid domain input. ErrInvalid = errors.New("database: invalid input") )
var ErrBrowseLeaseLost = errors.New("database: browse lease lost")
ErrBrowseLeaseLost prevents a replaced, expired or retired worker publishing.
var ErrMigrationDrift = errors.New("database: migration drift")
ErrMigrationDrift means an applied migration no longer matches the binary.
Functions ¶
func CheckRuntimeCompatibility ¶
CheckRuntimeCompatibility verifies all durable readiness invariants without creating or migrating schema.
func ValidBrowserSession ¶
ValidBrowserSession verifies the distinct, canonical browser credential syntax.
Types ¶
type APIToken ¶
type APIToken struct {
ID string `db:"id"`
IdentityID string `db:"identity_id"`
Label string `db:"label"`
Digest []byte `db:"digest"`
ExpiresAt pgtype.Timestamptz `db:"expires_at"`
RevokedAt pgtype.Timestamptz `db:"revoked_at"`
CreatedAt pgtype.Timestamptz `db:"created_at"`
}
type Actor ¶
type Actor struct {
IdentityID string
TokenID string
Kind string
Handle string
Operator bool
RequestID string
}
Actor is the current authenticated identity and token at one decision point.
type AuditEvent ¶
type AuditEvent struct {
ID string `db:"id"`
OccurredAt pgtype.Timestamptz `db:"occurred_at"`
EventKind string `db:"event_kind"`
OperationID *string `db:"operation_id"`
IntentEventID *string `db:"intent_event_id"`
IntentEventKind *string `db:"intent_event_kind"`
RequestID string `db:"request_id"`
ActorIdentityID *string `db:"actor_identity_id"`
ActorTokenID *string `db:"actor_token_id"`
Action string `db:"action"`
TargetKind string `db:"target_kind"`
TargetID string `db:"target_id"`
Result string `db:"result"`
RRsetSummary []byte `db:"rrset_summary"`
MatchedDelegationIDs []string `db:"matched_delegation_ids"`
Details []byte `db:"details"`
ResponseClass *string `db:"response_class"`
ResponseCode *int32 `db:"response_code"`
RequestDigest []byte `db:"request_digest"`
ResponseDigest []byte `db:"response_digest"`
DeadlineAt pgtype.Timestamptz `db:"deadline_at"`
}
type AuditListOptions ¶
type AuditPage ¶
type AuditPage struct {
Items []AuditRecord
Next *page.Key
}
type AuditRecord ¶
type AuditRecord struct {
ID string `json:"id"`
OccurredAt time.Time `json:"occurred_at"`
RequestID string `json:"request_id"`
ActorID *string `json:"actor_id"`
Action string `json:"action"`
TargetKind string `json:"target_type"`
TargetID string `json:"target_id"`
Result string `json:"result"`
Details json.RawMessage `json:"details"`
}
type AuthenticateTokenParams ¶
type AuthenticateTokenRow ¶
type AuthorizationDecision ¶
type AuthorizationDecision struct {
Actor Actor `json:"-"`
Allowed bool `json:"allowed"`
ZoneBindingID string `json:"-"`
Denied []DeniedRRsetTuple `json:"denied"`
MatchedDelegationIDs []string `json:"-"`
}
type AuthorizationDenialInput ¶
type AuthorizationDenialInput struct {
Action string
TargetKind string
TargetID string
Details map[string]any
RequestDigest []byte
}
AuthorizationDenialInput is sanitized evidence for an authenticated request rejected before a DNS mutation handler is reached.
type AuthorizeRRsetBatchRow ¶
type AuthorizeRRsetBatchRow struct {
TokenID string `db:"token_id"`
IdentityID string `db:"identity_id"`
IdentityKind string `db:"identity_kind"`
IdentityHandle string `db:"identity_handle"`
IsOperator bool `db:"is_operator"`
ZoneBindingID string `db:"zone_binding_id"`
BatchIndex int32 `db:"batch_index"`
Owner string `db:"owner"`
RecordType string `db:"record_type"`
ChangeKind string `db:"change_kind"`
Allowed bool `db:"allowed"`
MatchedDelegationIDs []string `db:"matched_delegation_ids"`
}
type BootstrapInput ¶
type BootstrapResult ¶
type BootstrapResult struct {
InstallationID string
Identity Identity
Token CreatedToken
}
type BrowseChange ¶
type BrowseChange struct {
Zone string `db:"zone"`
Operation string `db:"operation"`
Name string `db:"name"`
Type string `db:"type"`
ReadyAt pgtype.Timestamptz `db:"ready_at"`
ChangedAt pgtype.Timestamptz `db:"changed_at"`
Processed bool `db:"processed"`
Lease *string `db:"lease"`
LeaseUntil pgtype.Timestamptz `db:"lease_until"`
}
type BrowseChangeClaim ¶
type BrowseChangeClaim struct {
BrowseClaim
Operation, Name, Type string
}
BrowseChangeClaim identifies one durable affected-set read, never a DNS write.
type BrowseClaim ¶
type BrowseClaim struct{ Zone, ZoneID, Lease string }
BrowseClaim fences one collection against lease replacement and zone lifetime.
type BrowseOptions ¶
type BrowseOptions struct{ Name, Match, Type, Cursor string }
type BrowsePage ¶
type BrowsePage struct {
Items []json.RawMessage `json:"items"`
NextCursor *string `json:"next_cursor"`
State string `json:"state"`
LastRefreshedAt *time.Time `json:"last_refreshed_at"`
Error *string `json:"error"`
}
BrowsePage carries bounded complete RRsets and explicit snapshot freshness.
type BrowseRrset ¶
type BrowseWorker ¶
type BrowseWorker struct {
// contains filtered or unexported fields
}
BrowseWorker runs one full collection and one affected-set reader per instance. Shared PostgreSQL leases coalesce requests and recover interrupted readers.
func NewBrowseWorker ¶
type BrowseZone ¶
type BrowseZone struct {
ID string `db:"id"`
Upstream string `db:"upstream"`
ZoneID string `db:"zone_id"`
Generation *string `db:"generation"`
Revision int64 `db:"revision"`
CursorKey []byte `db:"cursor_key"`
LastViewedAt pgtype.Timestamptz `db:"last_viewed_at"`
RefreshedAt pgtype.Timestamptz `db:"refreshed_at"`
Error *string `db:"error"`
FullRequested bool `db:"full_requested"`
FullLease *string `db:"full_lease"`
FullLeaseUntil pgtype.Timestamptz `db:"full_lease_until"`
FullStartedAt pgtype.Timestamptz `db:"full_started_at"`
RetryAt pgtype.Timestamptz `db:"retry_at"`
}
type BrowserSession ¶
type BrowserSession struct {
Digest []byte `db:"digest"`
TokenID string `db:"token_id"`
CreatedAt pgtype.Timestamptz `db:"created_at"`
ExpiresAt pgtype.Timestamptz `db:"expires_at"`
}
type CreateAPITokenParams ¶
type CreateAPITokenRow ¶
type CreateAPITokenRow struct {
ID string `db:"id"`
IdentityID string `db:"identity_id"`
Label string `db:"label"`
ExpiresAt pgtype.Timestamptz `db:"expires_at"`
RevokedAt pgtype.Timestamptz `db:"revoked_at"`
CreatedAt pgtype.Timestamptz `db:"created_at"`
Status string `db:"status"`
}
type CreateDelegationParams ¶
type CreateGroupParams ¶
type CreateIdentityParams ¶
type CreateZoneBindingParams ¶
type CreatedBrowserSession ¶
CreatedBrowserSession carries the one-time secret to the cookie response only.
type CreatedToken ¶
type CreatedToken struct {
Token TokenMetadata
Secret string
}
type DNSIntentInput ¶
type DNSOutcome ¶
type DNSOutcomeInput ¶
type Delegation ¶
type Delegation struct {
ID string `db:"id"`
ZoneBindingID string `db:"zone_binding_id"`
GranteeIdentityID *string `db:"grantee_identity_id"`
GranteeGroupID *string `db:"grantee_group_id"`
CreatedByIdentityID string `db:"created_by_identity_id"`
RevokedByIdentityID *string `db:"revoked_by_identity_id"`
CreatedAt pgtype.Timestamptz `db:"created_at"`
RevokedAt pgtype.Timestamptz `db:"revoked_at"`
}
type DelegationChangeKind ¶
type DelegationCreate ¶
type DelegationDetails ¶
type DelegationDetails struct {
ZoneID string
ZoneName string
ID string
ZoneBindingID string
GranteeKind string
GranteeID string
Selectors []DelegationSelectorInput
RecordTypes []string
ChangeKinds []string
CreatedAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
}
type DelegationListOptions ¶
type DelegationPage ¶
type DelegationPage struct {
Items []DelegationDetails
Next *page.Key
}
type DelegationRecordType ¶
type DelegationSelector ¶
type DelegationSelectorInput ¶
type DelegationSelectorInput struct {
Kind delegationdomain.SelectorKind
Value string
}
type DeniedRRsetTuple ¶
type GetAPITokenMetadataRow ¶
type GetAPITokenMetadataRow struct {
ID string `db:"id"`
IdentityID string `db:"identity_id"`
Label string `db:"label"`
ExpiresAt pgtype.Timestamptz `db:"expires_at"`
RevokedAt pgtype.Timestamptz `db:"revoked_at"`
CreatedAt pgtype.Timestamptz `db:"created_at"`
Status string `db:"status"`
}
type GetAuditEventByIDRow ¶
type GetAuditEventByIDRow struct {
ID string `db:"id"`
OccurredAt pgtype.Timestamptz `db:"occurred_at"`
EventKind string `db:"event_kind"`
OperationID *string `db:"operation_id"`
IntentEventID *string `db:"intent_event_id"`
RequestID string `db:"request_id"`
ActorIdentityID *string `db:"actor_identity_id"`
ActorTokenID *string `db:"actor_token_id"`
Action string `db:"action"`
TargetKind string `db:"target_kind"`
TargetID string `db:"target_id"`
Result string `db:"result"`
RRsetSummary []byte `db:"rrset_summary"`
MatchedDelegationIDs []string `db:"matched_delegation_ids"`
Details []byte `db:"details"`
ResponseClass *string `db:"response_class"`
ResponseCode *int32 `db:"response_code"`
RequestDigest []byte `db:"request_digest"`
ResponseDigest []byte `db:"response_digest"`
DeadlineAt pgtype.Timestamptz `db:"deadline_at"`
}
type GetBootstrapStateRow ¶
type GetBrowseZoneParams ¶
type GetDNSOutcomeByOperationIDRow ¶
type GetDNSOutcomeByOperationIDRow struct {
ID string `db:"id"`
EventKind string `db:"event_kind"`
OperationID string `db:"operation_id"`
IntentEventID string `db:"intent_event_id"`
Result string `db:"result"`
ResponseClass *string `db:"response_class"`
ResponseCode *int32 `db:"response_code"`
ResponseDigest []byte `db:"response_digest"`
OccurredAt pgtype.Timestamptz `db:"occurred_at"`
}
type GetDelegationDetailsRow ¶
type GetDelegationDetailsRow struct {
ID string `db:"id"`
ZoneBindingID string `db:"zone_binding_id"`
GranteeKind string `db:"grantee_kind"`
GranteeID string `db:"grantee_id"`
CreatedAt pgtype.Timestamptz `db:"created_at"`
RevokedAt pgtype.Timestamptz `db:"revoked_at"`
}
type GetInstallationMetadataRow ¶
type GetInstallationMetadataRow struct {
InstallationID string `db:"installation_id"`
InitializedAt pgtype.Timestamptz `db:"initialized_at"`
RestoreRequired bool `db:"restore_required"`
RestoreFinalizedAt pgtype.Timestamptz `db:"restore_finalized_at"`
}
type Group ¶
type Group struct {
ID string `db:"id"`
Handle string `db:"handle"`
DisplayName *string `db:"display_name"`
Enabled bool `db:"enabled"`
CreatedAt pgtype.Timestamptz `db:"created_at"`
UpdatedAt pgtype.Timestamptz `db:"updated_at"`
}
type GroupCreate ¶
type GroupListOptions ¶
type GroupMembership ¶
type GroupMembership struct {
GroupID string `db:"group_id"`
IdentityID string `db:"identity_id"`
AddedByIdentityID string `db:"added_by_identity_id"`
CreatedAt pgtype.Timestamptz `db:"created_at"`
}
type GroupPatch ¶
type GroupPatch struct {
DisplayName NullableStringPatch
Enabled *bool
}
type Identity ¶
type Identity struct {
ID string `db:"id"`
Kind string `db:"kind"`
Handle string `db:"handle"`
DisplayName *string `db:"display_name"`
Enabled bool `db:"enabled"`
IsOperator bool `db:"is_operator"`
CreatedAt pgtype.Timestamptz `db:"created_at"`
UpdatedAt pgtype.Timestamptz `db:"updated_at"`
}
type IdentityCreate ¶
type IdentityListOptions ¶
type IdentityPage ¶
type IdentityPatch ¶
type IdentityPatch struct {
DisplayName NullableStringPatch
Enabled *bool
Operator *bool
}
type InsertAuthorizationDeniedAuditParams ¶
type InsertAuthorizationDeniedAuditParams struct {
ID string `db:"id"`
RequestID string `db:"request_id"`
ActorIdentityID string `db:"actor_identity_id"`
ActorTokenID string `db:"actor_token_id"`
Action string `db:"action"`
TargetKind string `db:"target_kind"`
TargetID string `db:"target_id"`
Details []byte `db:"details"`
RequestDigest []byte `db:"request_digest"`
}
type InsertAuthorizationDeniedAuditRow ¶
type InsertAuthorizationDeniedAuditRow struct {
ID string `db:"id"`
OccurredAt pgtype.Timestamptz `db:"occurred_at"`
EventKind string `db:"event_kind"`
OperationID *string `db:"operation_id"`
IntentEventID *string `db:"intent_event_id"`
RequestID string `db:"request_id"`
ActorIdentityID *string `db:"actor_identity_id"`
ActorTokenID *string `db:"actor_token_id"`
Action string `db:"action"`
TargetKind string `db:"target_kind"`
TargetID string `db:"target_id"`
Result string `db:"result"`
RRsetSummary []byte `db:"rrset_summary"`
MatchedDelegationIDs []string `db:"matched_delegation_ids"`
Details []byte `db:"details"`
ResponseClass *string `db:"response_class"`
ResponseCode *int32 `db:"response_code"`
RequestDigest []byte `db:"request_digest"`
ResponseDigest []byte `db:"response_digest"`
DeadlineAt pgtype.Timestamptz `db:"deadline_at"`
}
type InsertDNSIntentParams ¶
type InsertDNSIntentParams struct {
ID string `db:"id"`
OperationID string `db:"operation_id"`
RequestID string `db:"request_id"`
ActorIdentityID string `db:"actor_identity_id"`
ActorTokenID string `db:"actor_token_id"`
Action string `db:"action"`
TargetKind string `db:"target_kind"`
TargetID string `db:"target_id"`
RRsetSummary []byte `db:"rrset_summary"`
MatchedDelegationIDs []string `db:"matched_delegation_ids"`
RequestDigest []byte `db:"request_digest"`
DeadlineAt pgtype.Timestamptz `db:"deadline_at"`
}
type InsertDNSIntentRow ¶
type InsertDNSIntentRow struct {
ID string `db:"id"`
OccurredAt pgtype.Timestamptz `db:"occurred_at"`
EventKind string `db:"event_kind"`
OperationID *string `db:"operation_id"`
IntentEventID *string `db:"intent_event_id"`
RequestID string `db:"request_id"`
ActorIdentityID *string `db:"actor_identity_id"`
ActorTokenID *string `db:"actor_token_id"`
Action string `db:"action"`
TargetKind string `db:"target_kind"`
TargetID string `db:"target_id"`
Result string `db:"result"`
RRsetSummary []byte `db:"rrset_summary"`
MatchedDelegationIDs []string `db:"matched_delegation_ids"`
Details []byte `db:"details"`
ResponseClass *string `db:"response_class"`
ResponseCode *int32 `db:"response_code"`
RequestDigest []byte `db:"request_digest"`
ResponseDigest []byte `db:"response_digest"`
DeadlineAt pgtype.Timestamptz `db:"deadline_at"`
}
type InsertDNSOutcomeParams ¶
type InsertManagementAuditParams ¶
type InsertManagementAuditParams struct {
ID string `db:"id"`
RequestID string `db:"request_id"`
ActorIdentityID string `db:"actor_identity_id"`
ActorTokenID string `db:"actor_token_id"`
Action string `db:"action"`
TargetKind string `db:"target_kind"`
TargetID string `db:"target_id"`
Result string `db:"result"`
Details []byte `db:"details"`
}
type InsertManagementAuditRow ¶
type InsertManagementAuditRow struct {
ID string `db:"id"`
OccurredAt pgtype.Timestamptz `db:"occurred_at"`
EventKind string `db:"event_kind"`
OperationID *string `db:"operation_id"`
IntentEventID *string `db:"intent_event_id"`
RequestID string `db:"request_id"`
ActorIdentityID *string `db:"actor_identity_id"`
ActorTokenID *string `db:"actor_token_id"`
Action string `db:"action"`
TargetKind string `db:"target_kind"`
TargetID string `db:"target_id"`
Result string `db:"result"`
RRsetSummary []byte `db:"rrset_summary"`
MatchedDelegationIDs []string `db:"matched_delegation_ids"`
Details []byte `db:"details"`
ResponseClass *string `db:"response_class"`
ResponseCode *int32 `db:"response_code"`
RequestDigest []byte `db:"request_digest"`
ResponseDigest []byte `db:"response_digest"`
DeadlineAt pgtype.Timestamptz `db:"deadline_at"`
}
type InstallationMetadata ¶
type InstallationMetadata struct {
Singleton bool `db:"singleton"`
InstallationID string `db:"installation_id"`
InitializedAt pgtype.Timestamptz `db:"initialized_at"`
RestoreRequired bool `db:"restore_required"`
RestoreFinalizedAt pgtype.Timestamptz `db:"restore_finalized_at"`
}
type ListAPITokensParams ¶
type ListAPITokensParams struct {
IdentityID string `db:"identity_id"`
AfterCreatedAt pgtype.Timestamptz `db:"after_created_at"`
AfterID string `db:"after_id"`
RowLimit int32 `db:"row_limit"`
}
type ListAPITokensRow ¶
type ListAPITokensRow struct {
ID string `db:"id"`
IdentityID string `db:"identity_id"`
Label string `db:"label"`
ExpiresAt pgtype.Timestamptz `db:"expires_at"`
RevokedAt pgtype.Timestamptz `db:"revoked_at"`
CreatedAt pgtype.Timestamptz `db:"created_at"`
Status string `db:"status"`
}
type ListAuditRecordsParams ¶
type ListAuditRecordsParams struct {
ActorID string `db:"actor_id"`
Action string `db:"action"`
TargetKind string `db:"target_kind"`
TargetID string `db:"target_id"`
Result string `db:"result"`
AfterOccurredAt pgtype.Timestamptz `db:"after_occurred_at"`
AfterID string `db:"after_id"`
RowLimit int32 `db:"row_limit"`
}
type ListAuditRecordsRow ¶
type ListAuditRecordsRow struct {
ID string `db:"id"`
OccurredAt pgtype.Timestamptz `db:"occurred_at"`
RequestID string `db:"request_id"`
ActorID string `db:"actor_id"`
Action string `db:"action"`
TargetKind string `db:"target_kind"`
TargetID string `db:"target_id"`
Result string `db:"result"`
Details []byte `db:"details"`
}
type ListBrowseRRsetsParams ¶
type ListBrowseRRsetsRow ¶
type ListDelegationDetailsRow ¶
type ListDelegationDetailsRow struct {
ID string `db:"id"`
ZoneBindingID string `db:"zone_binding_id"`
GranteeKind string `db:"grantee_kind"`
GranteeID string `db:"grantee_id"`
CreatedAt pgtype.Timestamptz `db:"created_at"`
RevokedAt pgtype.Timestamptz `db:"revoked_at"`
}
type ListEffectiveDelegationDetailsParams ¶
type ListEffectiveDelegationDetailsParams struct {
IdentityID string `db:"identity_id"`
AfterCreatedAt pgtype.Timestamptz `db:"after_created_at"`
AfterID string `db:"after_id"`
RowLimit int32 `db:"row_limit"`
}
type ListEffectiveDelegationDetailsRow ¶
type ListEffectiveDelegationDetailsRow struct {
ID string `db:"id"`
ZoneBindingID string `db:"zone_binding_id"`
PowerDNSZoneID string `db:"powerdns_zone_id"`
ZoneName string `db:"zone_name"`
GranteeKind string `db:"grantee_kind"`
GranteeID string `db:"grantee_id"`
CreatedAt pgtype.Timestamptz `db:"created_at"`
RevokedAt pgtype.Timestamptz `db:"revoked_at"`
}
type ListGroupMembersParams ¶
type ListGroupsParams ¶
type ListIdentitiesParams ¶
type ListIdentitiesParams struct {
Kind *string `db:"kind"`
Enabled *bool `db:"enabled"`
IsOperator *bool `db:"is_operator"`
Handle *string `db:"handle"`
HandlePrefix *string `db:"handle_prefix"`
AfterCreatedAt pgtype.Timestamptz `db:"after_created_at"`
AfterID string `db:"after_id"`
RowLimit int32 `db:"row_limit"`
}
type ListIdentityAssignmentDetailsParams ¶
type ListIdentityAssignmentDetailsParams struct {
IdentityID string `db:"identity_id"`
AfterCreatedAt pgtype.Timestamptz `db:"after_created_at"`
AfterID string `db:"after_id"`
RowLimit int32 `db:"row_limit"`
}
type ListIdentityAssignmentDetailsRow ¶
type ListIdentityAssignmentDetailsRow struct {
ID string `db:"id"`
ZoneBindingID string `db:"zone_binding_id"`
PowerDNSZoneID string `db:"powerdns_zone_id"`
ZoneName string `db:"zone_name"`
GranteeKind string `db:"grantee_kind"`
GranteeID string `db:"grantee_id"`
CreatedAt pgtype.Timestamptz `db:"created_at"`
RevokedAt pgtype.Timestamptz `db:"revoked_at"`
IdentityEnabled bool `db:"identity_enabled"`
GroupEnabled *bool `db:"group_enabled"`
GroupHandle *string `db:"group_handle"`
BindingStatus string `db:"binding_status"`
Effective bool `db:"effective"`
}
type ListZoneBindingsParams ¶
type NullableStringPatch ¶
type OperatorCredential ¶
type OperatorCredential struct {
Identity Identity
Token TokenMetadata
Secret string
}
type OperatorGuard ¶
type OperatorGuard struct {
Singleton bool `db:"singleton"`
}
type OperatorRecoveryInput ¶
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AddGroupMembership ¶
func (*Queries) AuthenticateToken ¶
func (q *Queries) AuthenticateToken(ctx context.Context, arg AuthenticateTokenParams) (AuthenticateTokenRow, error)
func (*Queries) AuthorizeRRsetBatch ¶
func (q *Queries) AuthorizeRRsetBatch(ctx context.Context, arg AuthorizeRRsetBatchParams) ([]AuthorizeRRsetBatchRow, error)
func (*Queries) BrowseHasPending ¶
func (*Queries) CloseOverdueDNSIntents ¶
func (*Queries) CountEnabledOperators ¶
func (*Queries) CreateAPIToken ¶
func (q *Queries) CreateAPIToken(ctx context.Context, arg CreateAPITokenParams) (CreateAPITokenRow, error)
func (*Queries) CreateBrowserSession ¶
func (q *Queries) CreateBrowserSession(ctx context.Context, arg CreateBrowserSessionParams) (pgtype.Timestamptz, error)
func (*Queries) CreateDelegation ¶
func (q *Queries) CreateDelegation(ctx context.Context, arg CreateDelegationParams) (Delegation, error)
func (*Queries) CreateDelegationChangeKind ¶
func (q *Queries) CreateDelegationChangeKind(ctx context.Context, arg CreateDelegationChangeKindParams) error
func (*Queries) CreateDelegationRecordType ¶
func (q *Queries) CreateDelegationRecordType(ctx context.Context, arg CreateDelegationRecordTypeParams) error
func (*Queries) CreateDelegationSelector ¶
func (q *Queries) CreateDelegationSelector(ctx context.Context, arg CreateDelegationSelectorParams) error
func (*Queries) CreateGroup ¶
func (*Queries) CreateIdentity ¶
func (*Queries) CreateInstallationMetadata ¶
func (*Queries) CreateOperatorIdentity ¶
func (*Queries) CreateZoneBinding ¶
func (q *Queries) CreateZoneBinding(ctx context.Context, arg CreateZoneBindingParams) (ZoneBinding, error)
func (*Queries) DeleteBrowserSession ¶
func (*Queries) DeleteExpiredBrowserSessions ¶
func (*Queries) FinalizeInstallationRestore ¶
func (q *Queries) FinalizeInstallationRestore(ctx context.Context) (InstallationMetadata, error)
func (*Queries) GetAPITokenMetadata ¶
func (q *Queries) GetAPITokenMetadata(ctx context.Context, arg GetAPITokenMetadataParams) (GetAPITokenMetadataRow, error)
func (*Queries) GetActiveZoneBindingByUpstreamZoneIDForUpdate ¶
func (q *Queries) GetActiveZoneBindingByUpstreamZoneIDForUpdate(ctx context.Context, arg GetActiveZoneBindingByUpstreamZoneIDForUpdateParams) (ZoneBinding, error)
func (*Queries) GetAuditEventByID ¶
func (*Queries) GetBootstrapState ¶
func (q *Queries) GetBootstrapState(ctx context.Context) (GetBootstrapStateRow, error)
func (*Queries) GetBrowseZone ¶
func (q *Queries) GetBrowseZone(ctx context.Context, arg GetBrowseZoneParams) (BrowseZone, error)
func (*Queries) GetDNSOutcomeByOperationID ¶
func (*Queries) GetDelegationByID ¶
func (*Queries) GetDelegationDetails ¶
func (*Queries) GetDelegationForUpdate ¶
func (*Queries) GetGroupByID ¶
func (*Queries) GetGroupForUpdate ¶
func (*Queries) GetGroupMembership ¶
func (q *Queries) GetGroupMembership(ctx context.Context, arg GetGroupMembershipParams) (GroupMembership, error)
func (*Queries) GetIdentityByHandleForUpdate ¶
func (*Queries) GetIdentityByID ¶
func (*Queries) GetIdentityForUpdate ¶
func (*Queries) GetInstallationMetadata ¶
func (q *Queries) GetInstallationMetadata(ctx context.Context) (GetInstallationMetadataRow, error)
func (*Queries) GetZoneBindingByID ¶
func (*Queries) GetZoneBindingForUpdate ¶
func (*Queries) GetZoneDeletionReconciliationState ¶
func (*Queries) InsertAuthorizationDeniedAudit ¶
func (q *Queries) InsertAuthorizationDeniedAudit(ctx context.Context, arg InsertAuthorizationDeniedAuditParams) (InsertAuthorizationDeniedAuditRow, error)
func (*Queries) InsertDNSIntent ¶
func (q *Queries) InsertDNSIntent(ctx context.Context, arg InsertDNSIntentParams) (InsertDNSIntentRow, error)
func (*Queries) InsertDNSOutcome ¶
func (*Queries) InsertManagementAudit ¶
func (q *Queries) InsertManagementAudit(ctx context.Context, arg InsertManagementAuditParams) (InsertManagementAuditRow, error)
func (*Queries) ListAPITokens ¶
func (q *Queries) ListAPITokens(ctx context.Context, arg ListAPITokensParams) ([]ListAPITokensRow, error)
func (*Queries) ListActiveZoneBindingCandidates ¶
func (q *Queries) ListActiveZoneBindingCandidates(ctx context.Context, arg ListActiveZoneBindingCandidatesParams) ([]ZoneBinding, error)
func (*Queries) ListAuditRecords ¶
func (q *Queries) ListAuditRecords(ctx context.Context, arg ListAuditRecordsParams) ([]ListAuditRecordsRow, error)
func (*Queries) ListBrowseRRsets ¶
func (q *Queries) ListBrowseRRsets(ctx context.Context, arg ListBrowseRRsetsParams) ([]ListBrowseRRsetsRow, error)
func (*Queries) ListBrowseRRsetsByType ¶
func (q *Queries) ListBrowseRRsetsByType(ctx context.Context, arg ListBrowseRRsetsByTypeParams) ([]ListBrowseRRsetsByTypeRow, error)
func (*Queries) ListDelegationChangeKindsByIDs ¶
func (*Queries) ListDelegationDetails ¶
func (q *Queries) ListDelegationDetails(ctx context.Context, arg ListDelegationDetailsParams) ([]ListDelegationDetailsRow, error)
func (*Queries) ListDelegationRecordTypesByIDs ¶
func (*Queries) ListDelegationSelectorsByIDs ¶
func (*Queries) ListEffectiveDelegationDetails ¶
func (q *Queries) ListEffectiveDelegationDetails(ctx context.Context, arg ListEffectiveDelegationDetailsParams) ([]ListEffectiveDelegationDetailsRow, error)
func (*Queries) ListGroupMembers ¶
func (*Queries) ListGroups ¶
func (*Queries) ListIdentities ¶
func (*Queries) ListIdentityAssignmentDetails ¶
func (q *Queries) ListIdentityAssignmentDetails(ctx context.Context, arg ListIdentityAssignmentDetailsParams) ([]ListIdentityAssignmentDetailsRow, error)
func (*Queries) ListIdentityGroups ¶
func (*Queries) ListZoneBindings ¶
func (q *Queries) ListZoneBindings(ctx context.Context, arg ListZoneBindingsParams) ([]ZoneBinding, error)
func (*Queries) LockOperatorGuard ¶
func (*Queries) LockZoneBindingKey ¶
func (*Queries) NextZoneBindingGeneration ¶
func (*Queries) RemoveGroupMembership ¶
func (*Queries) RequestBrowseRefresh ¶
func (*Queries) RetireZoneBinding ¶
func (q *Queries) RetireZoneBinding(ctx context.Context, arg RetireZoneBindingParams) (ZoneBinding, error)
func (*Queries) RevokeAPIToken ¶
func (q *Queries) RevokeAPIToken(ctx context.Context, arg RevokeAPITokenParams) (RevokeAPITokenRow, error)
func (*Queries) RevokeAllActiveAPITokens ¶
func (*Queries) RevokeDelegation ¶
func (q *Queries) RevokeDelegation(ctx context.Context, arg RevokeDelegationParams) (Delegation, error)
func (*Queries) RevokeDelegationsForZoneDeletion ¶
func (*Queries) TouchBrowseZone ¶
func (q *Queries) TouchBrowseZone(ctx context.Context, arg TouchBrowseZoneParams) (BrowseZone, error)
func (*Queries) UpdateGroup ¶
func (*Queries) UpdateIdentity ¶
func (*Queries) ZoneBindingHistoryExists ¶
type RRsetTuple ¶
type RestoreFinalizationInput ¶
type RestoreFinalizationInput = OperatorRecoveryInput
type RetainedAssignment ¶
type RetainedAssignmentPage ¶
type RetainedAssignmentPage struct {
Items []RetainedAssignment
Next *page.Key
}
type RetireZoneBindingParams ¶
type RevokeAPITokenParams ¶
type RevokeAPITokenRow ¶
type RevokeAPITokenRow struct {
ID string `db:"id"`
IdentityID string `db:"identity_id"`
Label string `db:"label"`
ExpiresAt pgtype.Timestamptz `db:"expires_at"`
RevokedAt pgtype.Timestamptz `db:"revoked_at"`
CreatedAt pgtype.Timestamptz `db:"created_at"`
Status string `db:"status"`
}
type RevokeDelegationParams ¶
type RuntimePoolConfig ¶
type RuntimePoolConfig struct {
ConnectionString string
MaxConnections int32
AuthenticationReserve int32
ReadinessReserve int32
ConnectTimeout time.Duration
StatementTimeout time.Duration
LockTimeout time.Duration
TransactionTimeout time.Duration
}
RuntimePoolConfig bounds all database connections owned by one API instance.
type RuntimePoolConfigurationSet ¶
type RuntimePoolConfigurationSet struct {
Requests poolConfiguration
Authentication poolConfiguration
Readiness poolConfiguration
}
RuntimePoolConfigurationSet holds separate capacity for ordinary requests, authentication decisions, and readiness probes.
func RuntimePoolConfigs ¶
func RuntimePoolConfigs(config RuntimePoolConfig) (RuntimePoolConfigurationSet, error)
RuntimePoolConfigs validates one immutable configuration and derives the three pool configurations without making a database connection.
type RuntimePools ¶
type RuntimePools struct {
Requests *pgxpool.Pool
Authentication *pgxpool.Pool
Readiness *pgxpool.Pool
}
RuntimePools are three primary-only pgx pools whose combined maximum is the configured per-instance connection limit.
func OpenRuntimePools ¶
func OpenRuntimePools(ctx context.Context, config RuntimePoolConfig) (*RuntimePools, error)
OpenRuntimePools creates lazy pools; callers explicitly ping through the readiness pool before accepting authenticated traffic.
func (*RuntimePools) Close ¶
func (pools *RuntimePools) Close()
Close releases every pool owned by the instance.
type SchemaStatus ¶
SchemaStatus describes how the durable migration ledger relates to this binary.
func MigrationStatus ¶
MigrationStatus inspects the migration ledger without creating or changing it.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store owns DANS persistence transactions and invariants.
func NewStore ¶
func NewStore(db transactor) *Store
NewStore returns a persistence store backed by a PostgreSQL connection or pool.
func (*Store) AddGroupMember ¶
func (*Store) Authenticate ¶
Authenticate resolves current API-token or browser-session state in one statement.
func (*Store) AuthorizeRRsetBatch ¶
func (s *Store) AuthorizeRRsetBatch(ctx context.Context, token, requestID, upstream, powerDNSZoneID string, tuples []RRsetTuple) (AuthorizationDecision, error)
AuthorizeRRsetBatch evaluates every tuple against one current database statement.
func (*Store) BindCreatedZone ¶
func (s *Store) BindCreatedZone(ctx context.Context, actor Actor, input ZoneBindingInput) (ZoneBinding, error)
func (*Store) Bootstrap ¶
func (s *Store) Bootstrap(ctx context.Context, input BootstrapInput) (BootstrapResult, error)
func (*Store) BrowseRRsets ¶
func (s *Store) BrowseRRsets(ctx context.Context, actor Actor, upstream, zoneID string, options BrowseOptions, refresh bool) (BrowsePage, error)
BrowseRRsets authenticates through the caller's current actor and reads a single consistent page while holding only the zone metadata row lock.
func (*Store) ClaimBrowseChange ¶
func (*Store) ClaimBrowseFull ¶
func (*Store) CleanupBrowseRows ¶
CleanupBrowseRows deletes a bounded batch of unpublished or retired snapshots.
func (*Store) CloseOverdueDNSIntents ¶
func (*Store) ConfirmZoneBindingAbsent ¶
func (*Store) CreateBrowserSession ¶
func (s *Store) CreateBrowserSession(ctx context.Context, token, previous string) (CreatedBrowserSession, error)
CreateBrowserSession replaces only the supplied previous browser session.
func (*Store) CreateDNSIntent ¶
func (*Store) CreateDelegation ¶
func (s *Store) CreateDelegation(ctx context.Context, actor Actor, input DelegationCreate) (DelegationDetails, error)
func (*Store) CreateGroup ¶
func (*Store) CreateIdentity ¶
func (*Store) CreateToken ¶
func (s *Store) CreateToken(ctx context.Context, actor Actor, identityID string, input TokenCreate) (CreatedToken, error)
func (*Store) DeleteBrowserSession ¶
DeleteBrowserSession invalidates a session without changing its original token.
func (*Store) EnsureZoneBinding ¶
func (s *Store) EnsureZoneBinding(ctx context.Context, actor Actor, input ZoneBindingInput) (ZoneBinding, error)
func (*Store) FailBrowseChange ¶
func (s *Store) FailBrowseChange(ctx context.Context, c BrowseChangeClaim) error
FailBrowseChange retains read work and avoids retrying DNS mutations.
func (*Store) FailBrowseFull ¶
func (s *Store) FailBrowseFull(ctx context.Context, c BrowseClaim) error
func (*Store) FinalizeRestore ¶
func (s *Store) FinalizeRestore(ctx context.Context, input RestoreFinalizationInput) (OperatorCredential, error)
FinalizeRestore atomically invalidates restored credentials and issues one replacement. The supported restore procedure keeps every API instance quiesced until this commits.
func (*Store) GetCurrentIdentity ¶
func (*Store) GetDelegation ¶
func (*Store) GetIdentity ¶
func (*Store) GetZoneBinding ¶
func (*Store) GetZoneBindingRecovery ¶
func (*Store) ListAuditEvents ¶
func (*Store) ListCurrentIdentityDelegations ¶
func (s *Store) ListCurrentIdentityDelegations(ctx context.Context, actor Actor, options DelegationListOptions) (DelegationPage, error)
func (*Store) ListCurrentIdentityGroups ¶
func (*Store) ListDelegations ¶
func (s *Store) ListDelegations(ctx context.Context, actor Actor, options DelegationListOptions) (DelegationPage, error)
func (*Store) ListGroupMembers ¶
func (s *Store) ListGroupMembers(ctx context.Context, actor Actor, groupID string, options IdentityListOptions) (IdentityPage, error)
func (*Store) ListGroups ¶
func (*Store) ListIdentities ¶
func (s *Store) ListIdentities(ctx context.Context, actor Actor, options IdentityListOptions) (IdentityPage, error)
func (*Store) ListIdentityAssignments ¶
func (s *Store) ListIdentityAssignments(ctx context.Context, actor Actor, identityID string, options DelegationListOptions) (RetainedAssignmentPage, error)
func (*Store) ListIdentityDelegations ¶
func (s *Store) ListIdentityDelegations(ctx context.Context, actor Actor, identityID string, options DelegationListOptions) (DelegationPage, error)
func (*Store) ListIdentityGroups ¶
func (*Store) ListTokens ¶
func (*Store) ListZoneBindings ¶
func (s *Store) ListZoneBindings(ctx context.Context, actor Actor, options ZoneBindingListOptions) (ZoneBindingPage, error)
func (*Store) ObserveZoneBinding ¶
func (s *Store) ObserveZoneBinding(ctx context.Context, actor Actor, input ZoneObservationInput) (ZoneObservation, error)
func (*Store) PatchGroup ¶
func (*Store) PatchIdentity ¶
func (*Store) PrepareZoneDeletion ¶
func (s *Store) PrepareZoneDeletion(ctx context.Context, actor Actor, input ZoneDeletionInput) (ZoneDeletionPlan, error)
func (*Store) PrepareZoneDeletionByUpstreamZoneID ¶
func (s *Store) PrepareZoneDeletionByUpstreamZoneID(ctx context.Context, actor Actor, input ZoneDeletionByUpstreamInput) (ZoneDeletionPlan, error)
func (*Store) PrepareZoneDeletionRetry ¶
func (s *Store) PrepareZoneDeletionRetry(ctx context.Context, actor Actor, input ZoneDeletionInput) (ZoneDeletionPlan, error)
func (*Store) ProbeAuditPersistence ¶
ProbeAuditPersistence verifies the complete audit INSERT path without retaining a probe event in the immutable ledger.
func (*Store) PublishBrowseChange ¶
func (s *Store) PublishBrowseChange(ctx context.Context, c BrowseChangeClaim, sets []json.RawMessage) error
func (*Store) PublishBrowseFull ¶
func (s *Store) PublishBrowseFull(ctx context.Context, c BrowseClaim) error
func (*Store) RebindZoneBinding ¶
func (s *Store) RebindZoneBinding(ctx context.Context, actor Actor, retiredBindingID string, input ZoneBindingInput) (ZoneBinding, error)
func (*Store) RecordAuthorizationDenial ¶
func (s *Store) RecordAuthorizationDenial(ctx context.Context, actor Actor, input AuthorizationDenialInput) error
RecordAuthorizationDenial appends one durable, sanitized denial event.
func (*Store) RecordDNSOutcome ¶
func (s *Store) RecordDNSOutcome(ctx context.Context, input DNSOutcomeInput) (DNSOutcome, error)
func (*Store) RecordZoneDeletionOutcome ¶
func (s *Store) RecordZoneDeletionOutcome(ctx context.Context, plan ZoneDeletionPlan, input ZoneDeletionOutcomeInput) (DNSOutcome, error)
func (*Store) RecoverOperator ¶
func (s *Store) RecoverOperator(ctx context.Context, input OperatorRecoveryInput) (OperatorCredential, error)
func (*Store) RemoveGroupMember ¶
func (*Store) RenewBrowseFull ¶
func (s *Store) RenewBrowseFull(ctx context.Context, c BrowseClaim) error
RenewBrowseFull holds only a metadata lock, independent of API collection.
func (*Store) RevokeDelegation ¶
func (*Store) RevokeToken ¶
func (*Store) StageBrowseRRsets ¶
func (s *Store) StageBrowseRRsets(ctx context.Context, c BrowseClaim, sets []json.RawMessage) error
func (*Store) WriteAuditNDJSON ¶
type TokenCreate ¶
type TokenListOptions ¶
type TokenMetadata ¶
type TokenMetadata struct {
ID string
IdentityID string
Label string
Status string
ExpiresAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
TokenMetadata deliberately excludes the credential digest and plaintext.
type TokenPage ¶
type TokenPage struct {
Items []TokenMetadata
Next *page.Key
}
type TouchBrowseZoneParams ¶
type UpdateGroupParams ¶
type UpdateIdentityParams ¶
type ZoneBinding ¶
type ZoneBinding struct {
ID string `db:"id"`
Generation int64 `db:"generation"`
Upstream string `db:"upstream"`
PowerDNSZoneID string `db:"powerdns_zone_id"`
ZoneName string `db:"zone_name"`
CreatedByIdentityID string `db:"created_by_identity_id"`
RetiredByIdentityID *string `db:"retired_by_identity_id"`
CreatedAt pgtype.Timestamptz `db:"created_at"`
RetiredAt pgtype.Timestamptz `db:"retired_at"`
}
type ZoneBindingInput ¶
type ZoneBindingListOptions ¶
type ZoneBindingPage ¶
type ZoneBindingPage struct {
Items []ZoneBinding
Next *page.Key
}
type ZoneBindingRecovery ¶
ZoneBindingRecovery describes advisory actions; mutations always recheck state.
type ZoneDeletionInput ¶
type ZoneDeletionOutcomeInput ¶
type ZoneDeletionOutcomeInput struct {
Result ZoneDeletionResult
ResponseClass string
ResponseCode *int
ResponseDigest []byte
}
type ZoneDeletionPlan ¶
type ZoneDeletionPlan struct {
Binding ZoneBinding
Intent DNSIntent
Upstream string
PowerDNSZoneID string
ZoneName string
}
type ZoneDeletionResult ¶
type ZoneDeletionResult string
const ( ZoneDeletionDeleted ZoneDeletionResult = "deleted" ZoneDeletionNotFound ZoneDeletionResult = "not_found" ZoneDeletionFailed ZoneDeletionResult = "failed" ZoneDeletionUnknown ZoneDeletionResult = "unknown" )
type ZoneObservation ¶
type ZoneObservationInput ¶
Source Files
¶
- audit.go
- authorization.go
- browse.go
- browse.sql.go
- browse_refresh.go
- browse_worker.go
- browser_sessions.go
- browser_sessions.sql.go
- compatibility.go
- db.go
- delegation.go
- generate.go
- group.go
- identity.go
- maintenance.go
- migrate.go
- models.go
- pool.go
- read.go
- resources.sql.go
- store.go
- token.go
- zone_binding.go
- zone_deletion.go
- zone_reconciliation.go