commit

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commit

type Commit struct {
	// Author is the person that created the commit.
	Author Signature `json:"author"`
	// Committer is the person that performed the commit.
	Committer Signature `json:"committer"`
	// Message is a description of the changes.
	Message string `json:"message"`
	// Tree is the current state of the repo files.
	Tree cid.Cid `json:"tree"`
	// Parents contains the CIDs of parent commits.
	Parents []cid.Cid `json:"parents"`
}

Commit contains info about changes to a repo.

func FromNode

func FromNode(node format.Node) (*Commit, error)

FromNode returns a commit from the node.

func (*Commit) Node

func (c *Commit) Node() (format.Node, error)

Node returns a node from the commit.

type Signature

type Signature struct {
	// Name is the name of the person who created the commit.
	Name string `json:"name"`
	// Email is an address that can be used to contact the committer.
	Email string `json:"email"`
	// When is the timestamp of when the commit was created.
	When time.Time `json:"when"`
}

Signature contains info about who created the commit.

Jump to

Keyboard shortcuts

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