Documentation
¶
Overview ¶
Package histfloor is the "history deleted before" floor: when a user deletes their history (all of it, or everything before a month), no later writer may bring that history back. Rivian still has the receipts and a catch-up still has the old samples, so without a floor the receipts syncer, the replay catch-up and the drive and charge writers would re-insert what the user just deleted.
The floor is one timestamp per user (users.history_deleted_before). It only ever rises. Writers that bring in data by itself, not because the user asked, drop any row that starts before it. A user's own import or restore is explicit and passes Bypass: it is the user choosing to put their data back. The floor is never shown or exported, and it goes with the account (it is a column of users).
Index ¶
- func Below(ctx context.Context, q Querier, uid uuid.UUID, t time.Time) (bool, error)
- func Bypass(ctx context.Context) context.Context
- func Get(ctx context.Context, q Querier, uid uuid.UUID) (time.Time, error)
- func Raise(ctx context.Context, e Execer, uid uuid.UUID, t time.Time) error
- type Execer
- type Querier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Below ¶
Below reports whether a row that starts at t is before uid's floor and so must be dropped.
func Bypass ¶
Bypass marks ctx as a user-started import or restore: the user is putting their own data back, so the floor does not apply.