Documentation
¶
Index ¶
- type BranchService
- func (s *BranchService) CreateBranch(projectID, name, parentID string) (*wal.Branch, error)
- func (s *BranchService) CreateBranchWithData(branch *wal.Branch) error
- func (s *BranchService) DeleteBranch(projectID, name string) error
- func (s *BranchService) ForceDeleteBranch(projectID, name string) error
- func (s *BranchService) GetBranch(projectID, name string) (*wal.Branch, error)
- func (s *BranchService) GetBranchByID(branchID string) (*wal.Branch, error)
- func (s *BranchService) GetChildBranches(parentID string) ([]*wal.Branch, error)
- func (s *BranchService) ListBranches(projectID string) ([]*wal.Branch, error)
- func (s *BranchService) UpdateBranchHead(branchID string, newLSN int64) error
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 ¶
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
Click to show internal directories.
Click to hide internal directories.