You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

thebigman.ddns.net/ipfs/go-ipld-git

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thebigman.ddns.net/ipfs/go-ipld-git

v0.1.0
Go
Version published
Created
Source

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

FAQs

Package last updated on 12 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts