gb

package
v0.0.0-...-6d944a2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotFoundErr = errors.New("not found")
)

Functions

This section is empty.

Types

type BranchRep

type BranchRep struct {
	Name       string              `json:"name"`
	Head       string              `json:"head"`
	SyncTime   int64               `json:"syncTime"`
	References []ReferenceHunksRep `json:"references,omitempty"`
	CommitTime int64               `json:"commitTime,omitempty"`
}

func (BranchRep) CountAll

func (b BranchRep) CountAll() map[string]int64

func (BranchRep) CountByFlag

func (b BranchRep) CountByFlag(matcher [][]string) map[string]int64

func (BranchRep) PrintReferenceCountTable

func (b BranchRep) PrintReferenceCountTable()

func (BranchRep) TotalHunkCount

func (b BranchRep) TotalHunkCount() int

func (BranchRep) WriteToJSON

func (b BranchRep) WriteToJSON(outDir string, opts options.Options) (path string, err error)

type ConfigurationError

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

type ExtinctionRep

type ExtinctionRep struct {
	Revision string `json:"revision"`
	Message  string `json:"message"`
	Time     int64  `json:"time"`
	FlagKey  string `json:"flagKey"`
}

type HunkRep

type HunkRep struct {
	FilePath           string   `json:"filePath"`
	StartingLineNumber int      `json:"startingLineNumber"`
	Lines              string   `json:"lines,omitempty"`
	FlagKey            string   `json:"flagKey"`
	Aliases            []string `json:"aliases,omitempty"`
	ContentHash        string   `json:"contentHash,omitempty"`
}

func (HunkRep) NumLines

func (h HunkRep) NumLines() int

func (HunkRep) Overlap

func (h HunkRep) Overlap(hr HunkRep) int

Returns the number of lines overlapping between the receiver (h) and the parameter (hr) hunkreps The return value will be negative if the hunks do not overlap

type OutputJSON

type OutputJSON struct {
	Branch   string    `json:"branch"`
	RepoName string    `json:"repoName,omitempty"`
	Refs     []HunkRep `json:"refs"`
}

type ReferenceHunksRep

type ReferenceHunksRep struct {
	Path  string    `json:"path"`
	Hunks []HunkRep `json:"hunks"`
}

Jump to

Keyboard shortcuts

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