Documentation ¶
Index ¶
- func BytesToUInt32(b []byte) uint32
- func DoZlibCompress(src []byte) []byte
- func DoZlibUnCompress(compressSrc []byte) []byte
- func IntTo3Bytes(i int) [3]byte
- func Sha1CheckSum(u []byte) [20]byte
- type FilePointers
- type FileType
- type GBase
- type GBaseInterface
- type GFile
- type GHash
- type GNeighbor
- type GTree
- func (t GTree) BeforeMarshal() JSlike.Object
- func (t GTree) MarshalJSON() ([]byte, error)
- func (t *GTree) Read(r io.Reader)
- func (t *GTree) SearchFile(nameOrHashPrefix string) []GFile
- func (t *GTree) SearchFileByNameExactly(filename string) *GFile
- func (t *GTree) SearchFileHash(nameOrHashPrefix string) []string
- func (t GTree) String() string
- func (t *GTree) UpdateChecksum()
- func (t *GTree) UpdateFileCount()
- func (t *GTree) Write(w io.Writer)
- func (t *GTree) WriteSummary(w io.Writer)
- type GitIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToUInt32 ¶
func DoZlibCompress ¶
func DoZlibUnCompress ¶
func IntTo3Bytes ¶
func Sha1CheckSum ¶
Types ¶
type FilePointers ¶
type FilePointers []*GFile
type FileType ¶
type FileType byte
* echo "blob 13\0test content" | shasum d670460b4b4aece5915caf5c68d12f560a9fe3e4 echo 'test content' | git hash-object -w --stdin git cat-file -p d670460b4b4aece5915caf5c68d12f560a9fe3e4 test content
type GBase ¶
type GBaseInterface ¶
type GFile ¶
func (GFile) MarshalJSON ¶
type GHash ¶
type GHash struct { GType FileType GLen uint32 GBin []byte Mark [20]byte MarkStr string FullBody bytes.Buffer }
func (GHash) GitRecordFile ¶
func (hash GHash) GitRecordFile()
type GNeighbor ¶
type GNeighbor struct { GTree RemoteAddr *utils.UDPAddr BridgeAddr *utils.UDPAddr Bypass string DivePass []string }
func (GNeighbor) BeforeMarshal ¶
func (GNeighbor) MarshalJSON ¶
type GTree ¶
type GTree struct { Version uint32 FileCount uint32 Files FilePointers Checksum [20]byte Neighbors []GNeighbor }
func (GTree) BeforeMarshal ¶
func (GTree) MarshalJSON ¶
func (*GTree) SearchFile ¶
func (*GTree) SearchFileByNameExactly ¶
func (*GTree) SearchFileHash ¶
func (*GTree) UpdateChecksum ¶
func (t *GTree) UpdateChecksum()
func (*GTree) UpdateFileCount ¶
func (t *GTree) UpdateFileCount()
Click to show internal directories.
Click to hide internal directories.