Documentation ¶
Overview ¶
Package node implement the node specification for the filetree extension.
Index ¶
- Constants
- Variables
- func IsNodeBlob(blob []byte) ([]byte, bool)
- type IndexValue
- type RawNode
- func (n *RawNode) AddData(key string, val interface{})
- func (n *RawNode) AddIndexedRef(index int, hash string)
- func (n *RawNode) AddRef(hash string)
- func (n *RawNode) ContentType() string
- func (n *RawNode) Encode() (string, []byte)
- func (n *RawNode) FileRefs() []*IndexValue
- func (n *RawNode) IsFile() bool
Constants ¶
View Source
const ( File = "file" Dir = "dir" )
View Source
const (
V1 = "1"
)
Variables ¶
View Source
var ( NodeBlobHeader = []byte("#blobstash/node\n") NodeBlobMsgpackEncoding = byte('1') NodeBlobOverhead = len(NodeBlobHeader) + 1 )
Functions ¶
func IsNodeBlob ¶
Types ¶
type IndexValue ¶
type RawNode ¶
type RawNode struct { ModTime int64 `msgpack:"mt,omitempty"` ChangeTime int64 `msgpack:"ct,omitempty"` Mode uint32 `msgpack:"mo,omitempty"` Name string `msgpack:"n"` Type string `msgpack:"t"` Size int `msgpack:"s"` Refs []interface{} `msgpack:"r"` Version string `msgpack:"v"` ContentHash string `msgpack:"ch"` Metadata map[string]interface{} `msgpack:"m,omitempty"` Hash string `msgpack:"-"` }
func (*RawNode) AddIndexedRef ¶
func (*RawNode) ContentType ¶
func (*RawNode) FileRefs ¶
func (n *RawNode) FileRefs() []*IndexValue
Click to show internal directories.
Click to hide internal directories.