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, after directory.AuditSequence, limit int) ([]directory.AuditEvent, error)
- func (s *Store) Close() error
- func (s *Store) CreateGroup(ctx context.Context, group directory.Group) (directory.Group, error)
- func (s *Store) CreateUser(ctx context.Context, user directory.ManagedUser) (directory.ManagedUser, error)
- func (s *Store) DeleteGroup(ctx context.Context, id, match string) error
- func (s *Store) DeleteUser(ctx context.Context, id, match string) error
- func (s *Store) GetGroup(ctx context.Context, id string) (directory.Group, error)
- func (s *Store) GetUser(ctx context.Context, id string) (directory.ManagedUser, error)
- func (s *Store) Groups(ctx context.Context) (directory.GroupSnapshot, error)
- func (s *Store) ListGroups(ctx context.Context, start, count int) ([]directory.Group, int, error)
- func (s *Store) ListUserFacts(ctx context.Context) ([]directory.User, directory.Revision, error)
- func (s *Store) ListUsers(ctx context.Context, start, count int) ([]directory.ManagedUser, int, error)
- func (s *Store) LookupUser(ctx context.Context, externalID string) (*directory.User, directory.Revision, error)
- func (s *Store) ReplaceGroup(ctx context.Context, id string, group directory.Group, match string) (directory.Group, error)
- func (s *Store) ReplaceUser(ctx context.Context, id string, user directory.ManagedUser, match string) (directory.ManagedUser, error)
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, after directory.AuditSequence, limit int) ([]directory.AuditEvent, error)
func (*Store) CreateGroup ¶
func (*Store) CreateUser ¶
func (s *Store) CreateUser(ctx context.Context, user directory.ManagedUser) (directory.ManagedUser, error)
func (*Store) DeleteGroup ¶
func (*Store) Groups ¶ added in v0.42.0
Groups returns current provisioned identities, including same-named groups, from one snapshot. Historical alias ownership no longer affects this view.
func (*Store) ListGroups ¶
func (*Store) ListUserFacts ¶
func (*Store) LookupUser ¶
func (*Store) ReplaceGroup ¶
func (*Store) ReplaceUser ¶
func (s *Store) ReplaceUser(ctx context.Context, id string, user directory.ManagedUser, match string) (directory.ManagedUser, error)
Click to show internal directories.
Click to hide internal directories.