{"modulePath":"github.com/RedAFD/code-core","version":"v1.14.0-rc8","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package gitgraph\n\n## Variables\n\n```go\nvar RelationCommit = \u0026Commit{\n\tRow: -1,\n}\n```\nRelationCommit represents an empty relation commit\n\n## Types\n\n```go\ntype Commit struct {\n\tCommit       *git.Commit\n\tUser         *models.User\n\tVerification *models.CommitVerification\n\tStatus       *models.CommitStatus\n\tFlow         int64\n\tRow          int\n\tColumn       int\n\tRefs         []git.Reference\n\tRev          string\n\tDate         string\n\tShortRev     string\n\tSubject      string\n}\n```\nCommit represents a commit at co-ordinate X, Y with the data\n\n```go\nfunc NewCommit(row, column int, line []byte) (*Commit, error)\n```\nNewCommit creates a new commit from a provided line\n\n```go\nfunc (c *Commit) OnlyRelation() bool\n```\nOnlyRelation returns whether this a relation only commit\n\n```go\ntype Flow struct {\n\tID          int64\n\tColorNumber int\n\tGlyphs      []Glyph\n\tCommits     []*Commit\n\tMinRow      int\n\tMinColumn   int\n\tMaxRow      int\n\tMaxColumn   int\n}\n```\nFlow represents a series of glyphs\n\n```go\nfunc NewFlow(flowID int64, color, row, column int) *Flow\n```\nNewFlow creates a new flow\n\n```go\nfunc (flow *Flow) AddGlyph(row, column int, glyph byte)\n```\nAddGlyph adds glyph at row and column\n\n```go\nfunc (flow *Flow) Color16() int\n```\nColor16 wraps the color numbers around mod 16\n\n```go\ntype Glyph struct {\n\tRow    int\n\tColumn int\n\tGlyph  byte\n}\n```\nGlyph represents a co-ordinate and glyph\n\n```go\ntype Graph struct {\n\tFlows     map[int64]*Flow\n\tCommits   []*Commit\n\tMinRow    int\n\tMinColumn int\n\tMaxRow    int\n\tMaxColumn int\n\t// contains filtered or unexported fields\n}\n```\nGraph represents a collection of flows\n\n```go\nfunc GetCommitGraph(r *git.Repository, page int, maxAllowedColors int, hidePRRefs bool, branches, files []string) (*Graph, error)\n```\nGetCommitGraph return a list of commit (GraphItems) from all branches\n\n```go\nfunc NewGraph() *Graph\n```\nNewGraph creates a basic graph\n\n```go\nfunc (graph *Graph) AddCommit(row, column int, flowID int64, data []byte) error\n```\nAddCommit adds a commit at row, column on flowID with the provided data\n\n```go\nfunc (graph *Graph) AddGlyph(row, column int, flowID int64, color int, glyph byte)\n```\nAddGlyph adds glyph to flows\n\n```go\nfunc (graph *Graph) Height() int\n```\nHeight returns the height of the graph\n\n```go\nfunc (graph *Graph) LoadAndProcessCommits(repository *models.Repository, gitRepo *git.Repository) error\n```\nLoadAndProcessCommits will load the git.Commits for each commit in the graph, the associate the commit with the user author, and check the commit verification before finally retrieving the latest status\n\n```go\nfunc (graph *Graph) Width() int\n```\nWidth returns the width of the graph\n\n```go\ntype Parser struct {\n\t// contains filtered or unexported fields\n}\n```\nParser represents a git graph parser. It is stateful containing the previous glyphs, detected flows and color assignments.\n\n```go\nfunc (parser *Parser) AddLineToGraph(graph *Graph, row int, line []byte) error\n```\nAddLineToGraph adds the line as a row to the graph\n\n```go\nfunc (parser *Parser) ParseGlyphs(glyphs []byte)\n```\nParseGlyphs parses the provided glyphs and sets the internal state\n\n```go\nfunc (parser *Parser) Reset()\n```\nReset resets the internal parser state.\n\n","path":"github.com/RedAFD/code-core/modules/gitgraph","name":"gitgraph","synopsis":"","isRedistributable":true}
