Documentation
¶
Overview ¶
Package types defines checkpoint domain types shared between the checkpoint implementation and its consumers (api, hub). This leaf package has zero internal dependencies, breaking the api→checkpoint import cycle.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrTagNotFound = errors.New("tag not found")
ErrTagNotFound is returned when a tag does not exist in the store. Separate from a generic error so the HTTP layer can map it to 404.
Functions ¶
This section is empty.
Types ¶
type BlobRef ¶
type BlobRef struct {
BeforeSHA string `json:"before_sha,omitempty"`
AfterSHA string `json:"after_sha,omitempty"`
}
BlobRef is the minimal struct for extracting blob SHA references from the event JSONL log. Shared between the checkpoint and gc packages to keep the JSON tag contract as a single source of truth.
type ConflictPayload ¶
type ConflictPayload struct {
Path string `json:"path"`
OtherChat string `json:"other_chat"`
ExpectedSHA string `json:"expected_sha"`
ActualSHA string `json:"actual_sha"`
Tag string `json:"tag"`
TS int64 `json:"ts"`
}
ConflictPayload is what the broadcaster receives per conflict.
type FileChange ¶
type FileChange struct {
Status FileStatus `json:"status"`
Path string `json:"path"`
LinesAdded int `json:"lines_added"`
LinesRemoved int `json:"lines_removed"`
}
FileChange is one entry returned by Diff.
type FileStatus ¶
type FileStatus string
FileStatus is a typed string for diff result statuses.
const ( FileAdded FileStatus = "A" FileModified FileStatus = "M" FileDeleted FileStatus = "D" )
FileAdded and the following constants define the valid FileStatus diff result values.
func (FileStatus) Valid ¶
func (s FileStatus) Valid() bool
Valid reports whether s is one of the three known diff statuses.