Documentation
¶
Overview ¶
Package sqlitestore implements the managed directory using embedded SQLite. All SQL and transaction ownership stay here; callers use directory.Store.
Index ¶
- type Store
- func (s *Store) Audit(ctx context.Context, cursor string, limit int) ([]directory.AuditEvent, string, error)
- func (s *Store) Close() error
- func (s *Store) CreateGroup(ctx context.Context, group directory.ManagedGroup, event directory.AuditEvent) (directory.ManagedGroup, error)
- func (s *Store) CreateUser(ctx context.Context, user directory.ManagedUser, event directory.AuditEvent) (directory.ManagedUser, error)
- func (s *Store) DeleteGroup(ctx context.Context, id, expectedVersion string, event directory.AuditEvent) error
- func (s *Store) DeleteUser(ctx context.Context, id, expectedVersion string, modified time.Time, ...) error
- func (s *Store) GetGroup(ctx context.Context, id string) (*directory.ManagedGroup, error)
- func (s *Store) GetUser(ctx context.Context, id string) (*directory.ManagedUser, error)
- func (s *Store) ListGroups(ctx context.Context, start, count int) ([]directory.ManagedGroup, int, error)
- func (s *Store) ListUsers(ctx context.Context, start, count int) ([]directory.ManagedUser, int, error)
- func (s *Store) LookupUser(ctx context.Context, id string) (*directory.User, error)
- func (s *Store) ReplaceGroup(ctx context.Context, group directory.ManagedGroup, expectedVersion string, ...) (directory.ManagedGroup, error)
- func (s *Store) ReplaceUser(ctx context.Context, user directory.ManagedUser, expectedVersion string, ...) (directory.ManagedUser, error)
- func (s *Store) SupportsPatchGroup() bool
- func (s *Store) SupportsPatchUser() bool
- func (s *Store) SupportsVersioning() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func Open ¶
Open creates a private database if needed. Schema version mismatches fail startup; existing databases are never upgraded here. Opening a database never falls back to an empty in-memory directory.
func (*Store) Audit ¶
func (s *Store) Audit(ctx context.Context, cursor string, limit int) ([]directory.AuditEvent, string, error)
Audit uses SQLite row positions only to resume this backend's scan. They are not audit event fields or a cross-backend ordering guarantee.
func (*Store) CreateGroup ¶
func (s *Store) CreateGroup(ctx context.Context, group directory.ManagedGroup, event directory.AuditEvent) (directory.ManagedGroup, error)
func (*Store) CreateUser ¶
func (s *Store) CreateUser(ctx context.Context, user directory.ManagedUser, event directory.AuditEvent) (directory.ManagedUser, error)
func (*Store) DeleteGroup ¶
func (*Store) DeleteUser ¶
func (*Store) ListGroups ¶
func (*Store) LookupUser ¶
LookupUser reads one authentication identity and its current group facts from one SQLite read transaction.
func (*Store) ReplaceGroup ¶
func (s *Store) ReplaceGroup(ctx context.Context, group directory.ManagedGroup, expectedVersion string, event directory.AuditEvent) (directory.ManagedGroup, error)
func (*Store) ReplaceUser ¶
func (s *Store) ReplaceUser(ctx context.Context, user directory.ManagedUser, expectedVersion string, event directory.AuditEvent) (directory.ManagedUser, error)
func (*Store) SupportsPatchGroup ¶ added in v0.43.0
func (*Store) SupportsPatchUser ¶ added in v0.43.0
Partial updates are not implemented yet.