Versions in this module Expand all Collapse all v0 v0.7.0 Jul 27, 2026 Changes in this version + const CheckpointFull + const CheckpointPassive + const CheckpointRestart + const CheckpointTruncate + const FossilApplicationID + const PhantomSize + var ErrAmbiguousVersion = errors.New("libfossil: ambiguous version prefix") + var ErrArtifactNotFound = errors.New("libfossil: artifact not found") + var ErrFileNotFound = errors.New("libfossil: file not found in checkin") + var ErrMergeConflict = errors.New("libfossil: merge has conflicts") + var ErrVersionNotFound = errors.New("libfossil: version not found") + func Clone(ctx context.Context, path string, t Transport, opts CloneOpts) (*Repo, *CloneResult, error) + func JulianToTime(j float64) time.Time + func TimeToJulian(t time.Time) float64 + type AnnotateOpts struct + FilePath string + StartRID int64 + type AnnotatedLine struct + Date time.Time + Text string + UUID string + User string + type BisectSession struct + type BuggifyChecker interface + Check func(site string, probability float64) bool + type Checkout struct + func (c *Checkout) Add(patterns []string) (int, error) + func (c *Checkout) Checkin(opts CheckoutCommitOpts) (int64, string, error) + func (c *Checkout) Close() error + func (c *Checkout) Dir() string + func (c *Checkout) Extract(rid int64, opts ExtractOpts) error + func (c *Checkout) HasChanges() (bool, error) + func (c *Checkout) Remove(patterns []string) error + func (c *Checkout) Rename(oldName, newName string) error + func (c *Checkout) Revert(opts RevertOpts) error + func (c *Checkout) Status() ([]CheckoutChange, error) + func (c *Checkout) Update(opts UpdateOpts) (UpdateResult, error) + func (c *Checkout) Version() (int64, string, error) + func (c *Checkout) WouldFork() (bool, error) + type CheckoutChange struct + Change string + Name string + type CheckoutCommitOpts struct + Branch string + Delta bool + Message string + Tags []string + User string + type CheckoutCreateOpts struct + Env *simio.Env + Observer CheckoutObserver + type CheckoutObserver interface + CommitCompleted func(info CommitEnd) + CommitStarted func(info CommitStart) + Error func(err error) + ExtractCompleted func(info ExtractEnd) + ExtractFileCompleted func(name string, change UpdateChange) + ExtractStarted func(info ExtractStart) + ScanCompleted func(info ScanEnd) + ScanStarted func(dir string) + func NopCheckoutObserver() CheckoutObserver + func StdoutCheckoutObserver() CheckoutObserver + type CheckoutOpenOpts struct + Env *simio.Env + Observer CheckoutObserver + SearchParents bool + type CheckpointMode = db.CheckpointMode + type CloneOpts struct + Buggify BuggifyChecker + Observer SyncObserver + Password string + User string + type CloneResult struct + ArtifactsLinked int + BlobsRecvd int + Messages []string + ProjectCode string + Rounds int + ServerCode string + type CommitEnd struct + RID int64 + UUID string + type CommitOpts struct + Comment string + Delta bool + Files []FileToCommit + MergeParents []int64 + ParentID int64 + PartialManifest bool + Tags []TagSpec + Time time.Time + User string + type CommitStart struct + Comment string + Files int + User string + type CreateOpts struct + ProjectCode string + Rand simio.Rand + User string + type Cursor = fsltype.Cursor + type DiffEntry struct + Name string + Unified string + type EventKind = fsltype.EventKind + const EventKindCheckin + const EventKindForum + const EventKindTag + const EventKindTechnote + const EventKindTicket + const EventKindWiki + type ExtractEnd struct + FilesWritten int + type ExtractOpts struct + Force bool + type ExtractStart struct + Dir string + RID int64 + type FileEntry struct + Name string + Perm string + UUID string + type FileToCommit struct + Content []byte + Name string + Perm string + type Fork struct + Ancestor int64 + LocalTip int64 + RemoteTip int64 + type FramedTransport interface + RoundTripFramed func(ctx context.Context, payload []byte) (resp []byte, contentType string, err error) + type FslError struct + Cause error + Code RC + Msg string + func (e *FslError) Error() string + func (e *FslError) Unwrap() error + type FslID = fsltype.FslID + type FslSize = fsltype.FslSize + type HTTPOption func(*httpTransport) + func WithHTTPClient(c *http.Client) HTTPOption + type HandleEnd struct + FilesRecvd int + FilesSent int + type HandleOpts struct + Buggify BuggifyChecker + Observer SyncObserver + type HandleStart struct + RemoteAddr string + type LogEntry struct + Comment string + Kind EventKind + Parents []string + RID int64 + Time time.Time + UUID string + User string + type LogOpts struct + Limit int + Start int64 + type MergeConflict struct + EndLine int + Name string + StartLine int + type MergeConflictError struct + Files []string + func (e *MergeConflictError) Error() string + func (e *MergeConflictError) Is(target error) bool + type MergeResult struct + Clean bool + Conflicts []MergeConflict + type MockTransport struct + Handler func(req []byte) []byte + func (t *MockTransport) RoundTrip(_ context.Context, payload []byte) ([]byte, error) + type PullOpts struct + MaxSend int + Observer SyncObserver + ProjectCode string + type RC int + const RCAccess + const RCAlreadyExists + const RCBreak + const RCChecksumMismatch + const RCConflict + const RCConsistency + const RCDB + const RCError + const RCIO + const RCLocked + const RCMisuse + const RCNYI + const RCNotACkout + const RCNotARepo + const RCNotFound + const RCOK + const RCOOM + const RCPhantom + const RCRange + const RCRepoMismatch + const RCRepoNeedsRebuild + const RCRepoVersion + const RCSizeMismatch + const RCStepDone + const RCStepError + const RCStepRow + const RCType + const RCUnsupported + func (rc RC) String() string + type Repo struct + func Create(path string, opts CreateOpts) (*Repo, error) + func Open(path string) (*Repo, error) + func (r *Repo) Ancestry(opts LogOpts) ([]LogEntry, error) + func (r *Repo) Annotate(opts AnnotateOpts) ([]AnnotatedLine, error) + func (r *Repo) BranchTip(name string) (int64, error) + func (r *Repo) Checkpoint(mode CheckpointMode) error + func (r *Repo) Close() error + func (r *Repo) Commit(opts CommitOpts) (int64, string, error) + func (r *Repo) Config(key string) (string, error) + func (r *Repo) CreateCheckout(dir string, opts CheckoutCreateOpts) (*Checkout, error) + func (r *Repo) CreateUser(opts UserOpts) error + func (r *Repo) DB() *db.DB + func (r *Repo) DeleteUser(login string) error + func (r *Repo) DetectForks() ([]Fork, error) + func (r *Repo) Diff(ridA, ridB int64, filePath string) ([]DiffEntry, error) + func (r *Repo) FindCommonAncestor(ridA, ridB int64) (int64, error) + func (r *Repo) GetUser(login string) (User, error) + func (r *Repo) HandleSync(ctx context.Context, payload []byte) ([]byte, error) + func (r *Repo) HandleSyncWithOpts(ctx context.Context, payload []byte, opts HandleOpts) ([]byte, error) + func (r *Repo) Inner() *repo.Repo + func (r *Repo) ListConflictForks() ([]string, error) + func (r *Repo) ListFiles(rid int64) ([]FileEntry, error) + func (r *Repo) ListUsers() ([]User, error) + func (r *Repo) Merge(srcBranch, dstBranch, message, user string) (int64, string, error) + func (r *Repo) OpenCheckout(dir string, opts CheckoutOpenOpts) (*Checkout, error) + func (r *Repo) Path() string + func (r *Repo) Pull(ctx context.Context, url string, opts PullOpts) (*SyncResult, error) + func (r *Repo) ReadFile(rid int64, filePath string) ([]byte, error) + func (r *Repo) ReadFileAt(version string, filePath string) ([]byte, error) + func (r *Repo) Redo(dir string) error + func (r *Repo) ResolveConflictFork(filename string) error + func (r *Repo) ResolveVersion(name string) (int64, error) + func (r *Repo) ServeHTTP(ctx context.Context, addr string) error + func (r *Repo) SetCaps(login, caps string) error + func (r *Repo) SetConfig(key, value string) error + func (r *Repo) SetPassword(login, password string) error + func (r *Repo) StashApply(dir string, id int64) error + func (r *Repo) StashClear() error + func (r *Repo) StashDrop(id int64) error + func (r *Repo) StashList() ([]StashEntry, error) + func (r *Repo) StashPop(dir string) error + func (r *Repo) StashSave(dir, comment string) error + func (r *Repo) Sync(ctx context.Context, t Transport, opts SyncOpts) (*SyncResult, error) + func (r *Repo) Tag(opts TagOpts) (int64, error) + func (r *Repo) Timeline(opts TimelineOpts) ([]TimelineEntry, error) + func (r *Repo) UUIDFromRID(rid int64) (string, error) + func (r *Repo) UVDelete(name string, mtime time.Time) error + func (r *Repo) UVList() ([]UVEntry, error) + func (r *Repo) UVRead(name string) ([]byte, int64, string, error) + func (r *Repo) UVWrite(name string, content []byte, mtime time.Time) error + func (r *Repo) Undo(dir string) error + func (r *Repo) Verify() error + func (r *Repo) WithTx(fn func(tx *db.Tx) error) error + func (r *Repo) XferHandler() http.HandlerFunc + type RevertOpts struct + Files []string + type RoundStats struct + BytesRecvd int + BytesSent int + FilesRecvd int + FilesSent int + Gimmes int + IGots int + type ScanEnd struct + FilesScanned int + type SessionEnd struct + FilesRecvd int + FilesSent int + Rounds int + type SessionStart struct + ProjectCode string + Pull bool + Push bool + UV bool + type StashEntry struct + Comment string + ID int64 + Time string + type StatusEntry struct + Change string + Name string + type SyncObserver interface + Completed func(info SessionEnd) + Error func(err error) + HandleCompleted func(info HandleEnd) + HandleStarted func(info HandleStart) + RoundCompleted func(round int, stats RoundStats) + RoundStarted func(round int) + Started func(info SessionStart) + TableSyncCompleted func(info TableSyncEnd) + TableSyncStarted func(info TableSyncStart) + func NopSyncObserver() SyncObserver + func StdoutSyncObserver() SyncObserver + type SyncOpts struct + Buggify BuggifyChecker + MaxSend int + Observer SyncObserver + Password string + PeerID string + Private bool + ProjectCode string + Pull bool + Push bool + ServerCode string + UV bool + User string + XTableSync bool + type SyncResult struct + BytesRecvd int64 + BytesSent int64 + Errors []string + FilesRecvd int + FilesSent int + Rounds int + UVFilesRecvd int + UVFilesSent int + UVGimmesSent int + type TableSyncEnd struct + RowsRecvd int + RowsSent int + Table string + type TableSyncStart struct + Table string + type TagOpts struct + Name string + TargetID int64 + Time time.Time + User string + Value string + type TagSpec struct + Name string + Value string + type TimelineEntry struct + Cursor Cursor + type TimelineOpts struct + After Cursor + Limit int + Type EventKind + type Transport interface + RoundTrip func(ctx context.Context, payload []byte) ([]byte, error) + func NewHTTPTransport(url string, opts ...HTTPOption) Transport + type TransportFunc func(ctx context.Context, payload []byte) ([]byte, error) + func (f TransportFunc) RoundTrip(ctx context.Context, payload []byte) ([]byte, error) + type UVEntry struct + Hash string + Mtime time.Time + Name string + Size int64 + type UpdateChange string + const ChangeAdded + const ChangeDeleted + const ChangeModified + type UpdateOpts struct + TargetRID int64 + type UpdateResult struct + Conflicted []string + FilesRemoved []string + FilesWritten []string + type User struct + Caps string + Login string + type UserOpts struct + Caps string + Login string + Password string