permissionsync

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncOptions

type SyncOptions struct {
	MarkDeprecated   bool
	DeleteOrphanAPIs bool
	DeleteOrphanMaps bool
}

SyncOptions controls sync behavior.

func DefaultSyncOptions

func DefaultSyncOptions() SyncOptions

DefaultSyncOptions returns the default sync options.

type SyncResult

type SyncResult struct {
	TotalRoutes           int
	PermissionsCreated    int
	PermissionsUpdated    int
	PermissionsDeprecated int
	APICreated            int
	APIUpdated            int
	APIDeleted            int
	MappingCreated        int
	MappingDeleted        int
	CreatedRoutes         []string
	UpdatedRoutes         []string
	DeletedRoutes         []string
}

SyncResult summarizes a sync run.

type Syncer

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

Syncer syncs permission snapshots into the database.

func NewSyncer

func NewSyncer(client *ent.Client, logger logging.Logger) *Syncer

NewSyncer creates a new permission syncer.

func (*Syncer) SyncSnapshot

func (s *Syncer) SyncSnapshot(ctx context.Context, snapshot frameperm.Snapshot, opts SyncOptions) (*SyncResult, error)

SyncSnapshot syncs a permission snapshot to the database.

Jump to

Keyboard shortcuts

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