Help us shape the future of Go! Take the 2026 Go Developer Survey

sqlitestore

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package sqlitestore implements the managed directory using embedded SQLite. All SQL and transaction ownership stay here; callers use directory.Store.

Index

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

func Open(path string) (*Store, error)

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) Close

func (s *Store) Close() error

func (*Store) CreateGroup

func (*Store) CreateUser

func (*Store) DeleteGroup

func (s *Store) DeleteGroup(ctx context.Context, id, expectedVersion string, event directory.AuditEvent) error

func (*Store) DeleteUser

func (s *Store) DeleteUser(ctx context.Context, id, expectedVersion string, modified time.Time, event directory.AuditEvent) error

func (*Store) GetGroup

func (s *Store) GetGroup(ctx context.Context, id string) (*directory.ManagedGroup, error)

func (*Store) GetUser

func (s *Store) GetUser(ctx context.Context, id string) (*directory.ManagedUser, error)

func (*Store) ListGroups

func (s *Store) ListGroups(ctx context.Context, start, count int) ([]directory.ManagedGroup, int, error)

func (*Store) ListUsers

func (s *Store) ListUsers(ctx context.Context, start, count int) ([]directory.ManagedUser, int, error)

func (*Store) LookupUser

func (s *Store) LookupUser(ctx context.Context, id string) (*directory.User, error)

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 (s *Store) SupportsPatchGroup() bool

func (*Store) SupportsPatchUser added in v0.43.0

func (s *Store) SupportsPatchUser() bool

Partial updates are not implemented yet.

func (*Store) SupportsVersioning added in v0.43.0

func (s *Store) SupportsVersioning() bool

Jump to

Keyboard shortcuts

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