Feat v0.6.3 dead code sweep (#38)
All checks were successful
All checks were successful
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #38.
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
"switchboard-core/models"
|
||||
)
|
||||
|
||||
// ── ConnectionStore (v0.38.1) ────────────────────────
|
||||
// ── ConnectionStore ────────────────────────
|
||||
|
||||
type ConnectionStore struct{}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"switchboard-core/models"
|
||||
)
|
||||
|
||||
// ── DependencyStore (v0.38.2) ────────────────────────
|
||||
// ── DependencyStore ────────────────────────
|
||||
|
||||
type DependencyStore struct{}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ func (s *GlobalConfigStore) GetAll(ctx context.Context) (map[string]models.JSONM
|
||||
return result, rows.Err()
|
||||
}
|
||||
|
||||
// ── OIDC state (v0.29.0-cs4) ────────────────────────────────────────────
|
||||
// ── OIDC state ────────────────────────────────────────────
|
||||
|
||||
func (s *GlobalConfigStore) SaveOIDCState(ctx context.Context, state, nonce, redirectTo string) error {
|
||||
_, err := DB.ExecContext(ctx, `
|
||||
@@ -86,7 +86,7 @@ func (s *GlobalConfigStore) CleanupOIDCState(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// ── CS6 additions (v0.29.0) ─────────────────────────────────────────────
|
||||
// ── CS6 additions ─────────────────────────────────────────────
|
||||
|
||||
func (s *GlobalConfigStore) GetString(ctx context.Context, key string) (string, error) {
|
||||
var val string
|
||||
|
||||
@@ -310,7 +310,7 @@ func (s *PackageStore) scanMany(ctx context.Context, query string, args ...inter
|
||||
return result, rows.Err()
|
||||
}
|
||||
|
||||
// ── Scoped visibility (v0.30.0) ──────────────────
|
||||
// ── Scoped visibility ──────────────────
|
||||
|
||||
func (s *PackageStore) ListVisiblePackages(ctx context.Context, userID string) ([]store.PackageRegistration, error) {
|
||||
return s.scanMany(ctx, `
|
||||
@@ -327,7 +327,7 @@ func (s *PackageStore) ListVisiblePackages(ctx context.Context, userID string) (
|
||||
ORDER BY p.source, p.title`, userID)
|
||||
}
|
||||
|
||||
// ── Package lifecycle (v0.30.0) ──────────────────
|
||||
// ── Package lifecycle ──────────────────
|
||||
|
||||
func (s *PackageStore) SetSchemaVersion(ctx context.Context, id string, version int) error {
|
||||
result, err := DB.ExecContext(ctx,
|
||||
@@ -367,7 +367,7 @@ func (s *PackageStore) SetPackageSettings(ctx context.Context, id string, settin
|
||||
return nil
|
||||
}
|
||||
|
||||
// ── Team-level settings (v0.2.0) ─────────────────
|
||||
// ── Team-level settings ─────────────────
|
||||
|
||||
func (s *PackageStore) GetTeamSettings(ctx context.Context, pkgID, teamID string) (json.RawMessage, error) {
|
||||
var settings []byte
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
)
|
||||
|
||||
// RateLimitStore manages distributed rate limit counters in Postgres.
|
||||
// v0.32.0: fixed-window counter — upsert per-second bucket, check burst.
|
||||
type RateLimitStore struct{}
|
||||
|
||||
func NewRateLimitStore() *RateLimitStore { return &RateLimitStore{} }
|
||||
|
||||
@@ -224,7 +224,7 @@ func (s *TeamStore) IsMember(ctx context.Context, teamID, userID string) (bool,
|
||||
}
|
||||
|
||||
|
||||
// ── CS1 additions (v0.29.0) ─────────────────────────────────────────────
|
||||
// ── CS1 additions ─────────────────────────────────────────────
|
||||
|
||||
func (s *TeamStore) Exists(ctx context.Context, teamID string) (bool, error) {
|
||||
var exists bool
|
||||
@@ -279,7 +279,7 @@ func (s *TeamStore) ListTeamAuditActions(ctx context.Context, teamID string) ([]
|
||||
return actions, rows.Err()
|
||||
}
|
||||
|
||||
// ── CS5b additions (v0.29.0) ────────────────────────────────────────────
|
||||
// ── CS5b additions ────────────────────────────────────────────
|
||||
|
||||
func (s *TeamStore) GetFirstTeamIDForUser(ctx context.Context, userID string) (string, error) {
|
||||
var teamID string
|
||||
@@ -291,7 +291,7 @@ func (s *TeamStore) GetFirstTeamIDForUser(ctx context.Context, userID string) (s
|
||||
return teamID, nil
|
||||
}
|
||||
|
||||
// ── CS6 additions (v0.29.0) ────────────────────────────────────────────
|
||||
// ── CS6 additions ────────────────────────────────────────────
|
||||
|
||||
func (s *TeamStore) AddMemberReturningID(ctx context.Context, teamID, userID, role string) (string, error) {
|
||||
var id string
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
)
|
||||
|
||||
// TicketStore manages WS auth tickets in Postgres.
|
||||
// v0.32.0: replaces in-memory sync.Map for cross-pod validation.
|
||||
type TicketStore struct{}
|
||||
|
||||
func NewTicketStore() *TicketStore { return &TicketStore{} }
|
||||
|
||||
@@ -187,7 +187,7 @@ func scanOneUser(ctx context.Context, query string, args ...interface{}) (*model
|
||||
ScanJSON(sj, &u.Settings)
|
||||
return &u, nil
|
||||
}
|
||||
// ── CS1 additions (v0.29.0) ─────────────────────────────────────────────
|
||||
// ── CS1 additions ─────────────────────────────────────────────
|
||||
|
||||
func (s *UserStore) Exists(ctx context.Context, userID string) (bool, error) {
|
||||
var exists bool
|
||||
@@ -231,7 +231,7 @@ func (s *UserStore) SearchActive(ctx context.Context, excludeUserID, query strin
|
||||
return results, rows.Err()
|
||||
}
|
||||
|
||||
// ── CS2 additions (v0.29.0) ─────────────────────────────────────────────
|
||||
// ── CS2 additions ─────────────────────────────────────────────
|
||||
|
||||
func (s *UserStore) MergeSettings(ctx context.Context, userID string, patch []byte) error {
|
||||
_, err := DB.ExecContext(ctx, `
|
||||
@@ -268,7 +268,7 @@ func (s *UserStore) CountAll(ctx context.Context) (int, error) {
|
||||
return count, err
|
||||
}
|
||||
|
||||
// ── CS4 additions (v0.29.0) ─────────────────────────────────────────────
|
||||
// ── CS4 additions ─────────────────────────────────────────────
|
||||
|
||||
func (s *UserStore) ClearVaultKeys(ctx context.Context, userID string) error {
|
||||
_, err := DB.ExecContext(ctx, `
|
||||
|
||||
@@ -404,7 +404,7 @@ func nullIfEmpty(s string) interface{} {
|
||||
return s
|
||||
}
|
||||
|
||||
// ── Instances (v0.3.1) ──────────────────────
|
||||
// ── Instances ──────────────────────
|
||||
|
||||
func (s *WorkflowStore) CreateInstance(ctx context.Context, inst *models.WorkflowInstance) error {
|
||||
stageData := jsonOrEmpty(inst.StageData)
|
||||
@@ -573,7 +573,7 @@ func (s *WorkflowStore) ListActiveInstances(ctx context.Context) ([]models.Workf
|
||||
return result, rows.Err()
|
||||
}
|
||||
|
||||
// ── Assignments (v0.3.1) ────────────────────
|
||||
// ── Assignments ────────────────────
|
||||
|
||||
func (s *WorkflowStore) CreateAssignment(ctx context.Context, a *models.WorkflowAssignment) error {
|
||||
reviewData := jsonOrEmpty(a.ReviewData)
|
||||
@@ -661,7 +661,7 @@ func (s *WorkflowStore) ListAssignmentsByUser(ctx context.Context, userID string
|
||||
return s.queryAssignments(ctx, q, args...)
|
||||
}
|
||||
|
||||
// ── Signoffs (v0.3.4) ─────────────────────────
|
||||
// ── Signoffs ─────────────────────────
|
||||
|
||||
func (s *WorkflowStore) CreateSignoff(ctx context.Context, so *models.WorkflowSignoff) error {
|
||||
return DB.QueryRowContext(ctx, `
|
||||
|
||||
Reference in New Issue
Block a user