gogigu

package
v0.0.0-...-3472b94 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

type Edge struct {
	EdgeType
	PosX int
}

type EdgeType

type EdgeType int
const (
	EdgeStraight EdgeType = iota
	EdgeUp
	EdgeDown
	EdgeBranch
	EdgeMerge
)

type Edges

type Edges []*Edge

type Node

type Node struct {
	Commit *object.Commit
	// contains filtered or unexported fields
}

func (*Node) Hash

func (n *Node) Hash() string

func (*Node) PosX

func (n *Node) PosX() int

func (*Node) PosY

func (n *Node) PosY() int

func (*Node) ShortHash

func (n *Node) ShortHash() string

type NodePriorityQueue

type NodePriorityQueue []*Node

func NewQueue

func NewQueue() *NodePriorityQueue

func (*NodePriorityQueue) Dequeue

func (q *NodePriorityQueue) Dequeue() *Node

func (*NodePriorityQueue) Enqueue

func (q *NodePriorityQueue) Enqueue(n *Node)

func (NodePriorityQueue) Len

func (q NodePriorityQueue) Len() int

func (NodePriorityQueue) Less

func (q NodePriorityQueue) Less(i, j int) bool

func (*NodePriorityQueue) Pop

func (q *NodePriorityQueue) Pop() interface{}

func (*NodePriorityQueue) Push

func (q *NodePriorityQueue) Push(x interface{})

func (NodePriorityQueue) Swap

func (q NodePriorityQueue) Swap(i, j int)

type Nodes

type Nodes []*Node

type Option

type Option struct {
	Sort
}

type Repository

type Repository struct {
	Nodes Nodes
	// contains filtered or unexported fields
}

func Calculate

func Calculate(src *git.Repository, opt *Option) (*Repository, error)

func (*Repository) Children

func (r *Repository) Children(hash string) Nodes

func (*Repository) ChildrenHashes

func (r *Repository) ChildrenHashes(hash string) []string

func (*Repository) Edges

func (r *Repository) Edges(posY int) []*Edge

func (*Repository) MaxPosX

func (r *Repository) MaxPosX() int

func (*Repository) Node

func (r *Repository) Node(hash string) *Node

func (*Repository) Parents

func (r *Repository) Parents(hash string) Nodes

func (*Repository) ParentsHashes

func (r *Repository) ParentsHashes(hash string) []string

type Sort

type Sort int
const (
	Topological Sort = iota
	CommitDate
)

Jump to

Keyboard shortcuts

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