Versions in this module Expand all Collapse all v1 v1.0.0 Sep 3, 2026 Changes in this version + const MigrationsTable + var ErrUnsupportedDialect = errors.New("sqlstore: unsupported dialect") + func Migrate(ctx context.Context, db *sql.DB, d sqlcommon.Dialect) ([]int, error) + func MigrationSet(d sqlcommon.Dialect) (sqlcommon.MigrationSet, error) + func Rollback(ctx context.Context, db *sql.DB, d sqlcommon.Dialect, target int) ([]int, error) + func Version(ctx context.Context, db *sql.DB, d sqlcommon.Dialect) (int, error) + type Options struct + SkipMigrate bool + type Store struct + func Open(ctx context.Context, db *sql.DB, d sqlcommon.Dialect, o Options) (*Store, error) + func (s *Store) CountRoot(ctx context.Context) (int, error) + func (s *Store) CreatePrincipal(ctx context.Context, p adminauth.Principal, digest string, now time.Time) (adminauth.Principal, error) + func (s *Store) DB() *sql.DB + func (s *Store) DeletePolicy(ctx context.Context, name string) error + func (s *Store) DeletePrincipal(ctx context.Context, name string) error + func (s *Store) GetPolicy(ctx context.Context, name string) (adminauth.Policy, error) + func (s *Store) Policies(ctx context.Context) ([]adminauth.Policy, error) + func (s *Store) PolicyVersion(ctx context.Context) (int64, error) + func (s *Store) Principal(ctx context.Context, name string) (adminauth.Principal, error) + func (s *Store) PrincipalByDigest(ctx context.Context, digest string) (adminauth.Principal, error) + func (s *Store) Principals(ctx context.Context, p adminauth.Page) (adminauth.Result[adminauth.Principal], error) + func (s *Store) PutPolicy(ctx context.Context, p adminauth.Policy, now time.Time) (adminauth.Policy, error) + func (s *Store) RevokeToken(ctx context.Context, name string, now time.Time) error + func (s *Store) SetToken(ctx context.Context, name, digest, tokenID string, expires, now time.Time) (adminauth.Principal, error) + func (s *Store) UpdatePrincipal(ctx context.Context, name string, roles []string, root bool, now time.Time) (adminauth.Principal, error)