wal

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchService

type BranchService struct {
	// contains filtered or unexported fields
}

BranchService manages WAL-based branches

func NewBranchService

func NewBranchService(db *mongo.Database, walService *wal.Service) (*BranchService, error)

NewBranchService creates a new WAL branch service

func (*BranchService) CreateBranch

func (s *BranchService) CreateBranch(projectID, name, parentID string) (*wal.Branch, error)

CreateBranch creates a new WAL-based branch

func (*BranchService) CreateBranchWithData

func (s *BranchService) CreateBranchWithData(branch *wal.Branch) error

CreateBranchWithData creates a branch with specific metadata

func (*BranchService) DeleteBranch

func (s *BranchService) DeleteBranch(projectID, name string) error

DeleteBranch deletes a branch (simple version - just removes the pointer)

func (*BranchService) ForceDeleteBranch

func (s *BranchService) ForceDeleteBranch(projectID, name string) error

ForceDeleteBranch deletes a branch without safety checks (for project deletion)

func (*BranchService) GetBranch

func (s *BranchService) GetBranch(projectID, name string) (*wal.Branch, error)

GetBranch retrieves a branch by project ID and name

func (*BranchService) GetBranchByID

func (s *BranchService) GetBranchByID(branchID string) (*wal.Branch, error)

GetBranchByID retrieves a branch by its ID

func (*BranchService) GetChildBranches

func (s *BranchService) GetChildBranches(parentID string) ([]*wal.Branch, error)

GetChildBranches returns all child branches of a given branch

func (*BranchService) ListBranches

func (s *BranchService) ListBranches(projectID string) ([]*wal.Branch, error)

ListBranches lists all branches for a project

func (*BranchService) UpdateBranchHead

func (s *BranchService) UpdateBranchHead(branchID string, newLSN int64) error

UpdateBranchHead updates the head LSN of a branch

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL