# README
Git ipld format
An IPLD codec for git objects allowing path traversals across the git graph.
Table of Contents
Install
go get github.com/ipfs/go-ipld-git
About
This is an IPLD codec which handles git objects. Objects are transformed into IPLD graph as detailed below. Objects are demonstrated here using both IPLD Schemas and example JSON forms.
Commit
type GpgSig string
type PersonInfo struct {
date String
timezone String
email String
name String
}
type Commit struct {
tree &Tree # see "Tree" section below
parents [&Commit]
message String
author optional PersonInfo
committer optional PersonInfo
encoding optional String
signature optional GpgSig
mergetag [Tag]
other [String]
}
As JSON, real data would look something like:
{
"author": {
"date": "1503667703",
"timezone": "+0200",
"email": "author@mail",
"name": "Author Name"
},
"committer": {
"date": "1503667703",
"timezone": "+0200",
"email": "author@mail",
"name": "Author Name"
},
"message": "Commit Message\n",
"parents": [
<LINK>, <LINK>, ...
],
"tree": <LINK>
}
Tag
type Tag struct {
object &Any
type String
tag String
tagger PersonInfo
message String
}
As JSON, real data would look something like:
{
"message": "message\n",
"object": {
"/": "baf4bcfg3mbz3yj3njqyr3ifdaqyfv3prei6h6bq"
},
"tag": "tagname",
"tagger": {
"date": "1503667703 +0200",
"email": "author@mail",
"name": "Author Name"
},
"type": "commit"
}
Tree
type Tree {String:TreeEntry}
type TreeEntry struct {
mode String
hash &Any
}
As JSON, real data would look something like:
{
"file.name": {
"mode": "100664",
"hash": <LINK>
},
"directoryname": {
"mode": "40000",
"hash": <LINK>
},
...
}
Blob
type Blob bytes
As JSON, real data would look something like:
"<base64 of 'blob <size>\0<data>'>"
Lead Maintainers
Contribute
PRs are welcome!
Small note: If editing the Readme, please conform to the standard-readme specification.
License
MIT © Jeromy Johnson
# Packages
No description provided by the author
# Functions
Decode reads from a reader to fill a NodeAssembler.
DecodeBlob fills a NodeAssembler (from `Type.Blob__Repr.NewBuilder()`) from a stream of bytes.
DecodeBlock attempts to parse a serialized ipfs block into an ipld node dag Deprecated: Parse ifrom data instead.
DecodeCommit fills a NodeAssembler (from `Type.Commit__Repr.NewBuilder()`) from a stream of bytes.
DecodeTag fills a NodeAssembler (from `Type.Tag__Repr.NewBuilder()`) from a stream of bytes.
DecodeTree fills a NodeAssembler (from `Type.Tree__Repr.NewBuilder()`) from a stream of bytes.
DecodeTreeEntry fills a NodeAssembler (from `Type.TreeEntry__Repr.NewBuilder()`) from a stream of bytes.
Encode serializes a git node to a raw binary form.
ParseCompressedObject works like ParseObject, but with a surrounding zlib compression.
ParseObject produces an ipld.Node from a stream / binary represnetation.
ParseObjectFromBuffer is like ParseObject, but with a fully in-memory stream.
# Variables
Type is a struct embeding a NodePrototype/Type for every Node implementation in this package.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author