Documentation ¶
Index ¶
- type Doctor
- type Issue
- type RefIssues
- type Resolution
- type Tree
- func (t *Tree) Down() (*objects.Commit, error)
- func (t *Tree) EditCommit(commit []byte, edit func(com *objects.Commit) (remove, update bool, err error)) error
- func (t *Tree) Head() (*objects.Commit, error)
- func (t *Tree) Position(commitSum []byte) (ancestors, descendants int, err error)
- func (t *Tree) Reset(headSum []byte) (err error)
- func (t *Tree) Up() (*objects.Commit, error)
- func (t *Tree) UpdateAllDescendants() ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Doctor ¶
type Doctor struct {
// contains filtered or unexported fields
}
type Issue ¶
type Issue struct { // Name of wrgl reference Ref string `json:"ref,omitempty"` // Number of descendant commits DescendantCount int `json:"descendantCount,omitempty"` // Number of ancestor commits AncestorCount int `json:"ancestorCount,omitempty"` // Previous commit sum (in case commit sum is not available) PreviousCommit []byte `json:"previousCommit,omitempty"` // Commit sum Commit []byte `json:"commit,omitempty"` // Table sum if any Table []byte `json:"table,omitempty"` // Block sum if any Block []byte `json:"block,omitempty"` // Block index sum if any BlockIndex []byte `json:"blockIndex,omitempty"` // Error encountered Err string `json:"err,omitempty"` // How to resolve the issue Resolution Resolution `json:"resolution,omitempty"` }
type Resolution ¶
type Resolution string
const ( UnknownResolution Resolution = "unknown" ResetPKResolution Resolution = "resetPK" ReingestResolution Resolution = "reingest" RemoveResolution Resolution = "remove" )
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
Tree traverses the entire commit tree to edit and modify individual commits. Traversal happens in 2 phases: 1. Go up from the head commit to the oldest ancestor commit. During this phase, each commit could be diagnosed and a resolution determined. 2. Go down from te oldest ancestor back up to the head. During this phase, each commit is modified, and their parent refs updated.
func (*Tree) EditCommit ¶
func (t *Tree) EditCommit(commit []byte, edit func(com *objects.Commit) (remove, update bool, err error)) error
EditCommit traverse from the current commit to its descendant commits.
func (*Tree) Head ¶
Head gets the bottom (head) commit. It returns io.EOF if there are no commit yet
func (*Tree) Up ¶
Up returns a parent commit if possible. It returns io.EOF when there are no more ancestor
func (*Tree) UpdateAllDescendants ¶
Click to show internal directories.
Click to hide internal directories.