capnp

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2018 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const Commit_TypeID = 0x8da013c66e545daf

Commit_TypeID is the unique identifier for the type Commit.

View Source
const DirEntry_TypeID = 0x8b15ee76774b1f9d

DirEntry_TypeID is the unique identifier for the type DirEntry.

View Source
const Directory_TypeID = 0xe24c59306c829c01

Directory_TypeID is the unique identifier for the type Directory.

View Source
const File_TypeID = 0x8ea7393d37893155

File_TypeID is the unique identifier for the type File.

View Source
const Ghost_TypeID = 0x80c828d7e89c12ea

Ghost_TypeID is the unique identifier for the type Ghost.

View Source
const Node_TypeID = 0xa629eb7f7066fae3

Node_TypeID is the unique identifier for the type Node.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commit

type Commit struct{ capnp.Struct }

Commit is a set of changes to nodes

func NewCommit

func NewCommit(s *capnp.Segment) (Commit, error)

func NewRootCommit

func NewRootCommit(s *capnp.Segment) (Commit, error)

func ReadRootCommit

func ReadRootCommit(msg *capnp.Message) (Commit, error)

func (Commit) Author

func (s Commit) Author() (string, error)

func (Commit) AuthorBytes

func (s Commit) AuthorBytes() ([]byte, error)

func (Commit) HasAuthor

func (s Commit) HasAuthor() bool

func (Commit) HasMessage

func (s Commit) HasMessage() bool

func (Commit) HasParent

func (s Commit) HasParent() bool

func (Commit) HasRoot

func (s Commit) HasRoot() bool

func (Commit) Index

func (s Commit) Index() int64

func (Commit) Merge

func (s Commit) Merge() Commit_merge

func (Commit) Message

func (s Commit) Message() (string, error)

func (Commit) MessageBytes

func (s Commit) MessageBytes() ([]byte, error)

func (Commit) Parent

func (s Commit) Parent() ([]byte, error)

func (Commit) Root

func (s Commit) Root() ([]byte, error)

func (Commit) SetAuthor

func (s Commit) SetAuthor(v string) error

func (Commit) SetIndex

func (s Commit) SetIndex(v int64)

func (Commit) SetMessage

func (s Commit) SetMessage(v string) error

func (Commit) SetParent

func (s Commit) SetParent(v []byte) error

func (Commit) SetRoot

func (s Commit) SetRoot(v []byte) error

func (Commit) String

func (s Commit) String() string

type Commit_List

type Commit_List struct{ capnp.List }

Commit_List is a list of Commit.

func NewCommit_List

func NewCommit_List(s *capnp.Segment, sz int32) (Commit_List, error)

NewCommit creates a new list of Commit.

func (Commit_List) At

func (s Commit_List) At(i int) Commit

func (Commit_List) Set

func (s Commit_List) Set(i int, v Commit) error

func (Commit_List) String

func (s Commit_List) String() string

type Commit_Promise

type Commit_Promise struct{ *capnp.Pipeline }

Commit_Promise is a wrapper for a Commit promised by a client call.

func (Commit_Promise) Merge

func (Commit_Promise) Struct

func (p Commit_Promise) Struct() (Commit, error)

type Commit_merge

type Commit_merge Commit

func (Commit_merge) HasHead

func (s Commit_merge) HasHead() bool

func (Commit_merge) HasWith

func (s Commit_merge) HasWith() bool

func (Commit_merge) Head

func (s Commit_merge) Head() ([]byte, error)

func (Commit_merge) SetHead

func (s Commit_merge) SetHead(v []byte) error

func (Commit_merge) SetWith

func (s Commit_merge) SetWith(v string) error

func (Commit_merge) With

func (s Commit_merge) With() (string, error)

func (Commit_merge) WithBytes

func (s Commit_merge) WithBytes() ([]byte, error)

type Commit_merge_Promise

type Commit_merge_Promise struct{ *capnp.Pipeline }

Commit_merge_Promise is a wrapper for a Commit_merge promised by a client call.

func (Commit_merge_Promise) Struct

func (p Commit_merge_Promise) Struct() (Commit_merge, error)

type DirEntry

type DirEntry struct{ capnp.Struct }

A single directory entry

func NewDirEntry

func NewDirEntry(s *capnp.Segment) (DirEntry, error)

func NewRootDirEntry

func NewRootDirEntry(s *capnp.Segment) (DirEntry, error)

func ReadRootDirEntry

func ReadRootDirEntry(msg *capnp.Message) (DirEntry, error)

func (DirEntry) HasHash

func (s DirEntry) HasHash() bool

func (DirEntry) HasName

func (s DirEntry) HasName() bool

func (DirEntry) Hash

func (s DirEntry) Hash() ([]byte, error)

func (DirEntry) Name

func (s DirEntry) Name() (string, error)

func (DirEntry) NameBytes

func (s DirEntry) NameBytes() ([]byte, error)

func (DirEntry) SetHash

func (s DirEntry) SetHash(v []byte) error

func (DirEntry) SetName

func (s DirEntry) SetName(v string) error

func (DirEntry) String

func (s DirEntry) String() string

type DirEntry_List

type DirEntry_List struct{ capnp.List }

DirEntry_List is a list of DirEntry.

func NewDirEntry_List

func NewDirEntry_List(s *capnp.Segment, sz int32) (DirEntry_List, error)

NewDirEntry creates a new list of DirEntry.

func (DirEntry_List) At

func (s DirEntry_List) At(i int) DirEntry

func (DirEntry_List) Set

func (s DirEntry_List) Set(i int, v DirEntry) error

func (DirEntry_List) String

func (s DirEntry_List) String() string

type DirEntry_Promise

type DirEntry_Promise struct{ *capnp.Pipeline }

DirEntry_Promise is a wrapper for a DirEntry promised by a client call.

func (DirEntry_Promise) Struct

func (p DirEntry_Promise) Struct() (DirEntry, error)

type Directory

type Directory struct{ capnp.Struct }

Directory contains one or more directories or files

func NewDirectory

func NewDirectory(s *capnp.Segment) (Directory, error)

func NewRootDirectory

func NewRootDirectory(s *capnp.Segment) (Directory, error)

func ReadRootDirectory

func ReadRootDirectory(msg *capnp.Message) (Directory, error)

func (Directory) Children

func (s Directory) Children() (DirEntry_List, error)

func (Directory) Contents added in v0.2.0

func (s Directory) Contents() (DirEntry_List, error)

func (Directory) HasChildren

func (s Directory) HasChildren() bool

func (Directory) HasContents added in v0.2.0

func (s Directory) HasContents() bool

func (Directory) HasParent

func (s Directory) HasParent() bool

func (Directory) NewChildren

func (s Directory) NewChildren(n int32) (DirEntry_List, error)

NewChildren sets the children field to a newly allocated DirEntry_List, preferring placement in s's segment.

func (Directory) NewContents added in v0.2.0

func (s Directory) NewContents(n int32) (DirEntry_List, error)

NewContents sets the contents field to a newly allocated DirEntry_List, preferring placement in s's segment.

func (Directory) Parent

func (s Directory) Parent() (string, error)

func (Directory) ParentBytes

func (s Directory) ParentBytes() ([]byte, error)

func (Directory) SetChildren

func (s Directory) SetChildren(v DirEntry_List) error

func (Directory) SetContents added in v0.2.0

func (s Directory) SetContents(v DirEntry_List) error

func (Directory) SetParent

func (s Directory) SetParent(v string) error

func (Directory) SetSize

func (s Directory) SetSize(v uint64)

func (Directory) Size

func (s Directory) Size() uint64

func (Directory) String

func (s Directory) String() string

type Directory_List

type Directory_List struct{ capnp.List }

Directory_List is a list of Directory.

func NewDirectory_List

func NewDirectory_List(s *capnp.Segment, sz int32) (Directory_List, error)

NewDirectory creates a new list of Directory.

func (Directory_List) At

func (s Directory_List) At(i int) Directory

func (Directory_List) Set

func (s Directory_List) Set(i int, v Directory) error

func (Directory_List) String

func (s Directory_List) String() string

type Directory_Promise

type Directory_Promise struct{ *capnp.Pipeline }

Directory_Promise is a wrapper for a Directory promised by a client call.

func (Directory_Promise) Struct

func (p Directory_Promise) Struct() (Directory, error)

type File

type File struct{ capnp.Struct }

A leaf node in the MDAG

func NewFile

func NewFile(s *capnp.Segment) (File, error)

func NewRootFile

func NewRootFile(s *capnp.Segment) (File, error)

func ReadRootFile

func ReadRootFile(msg *capnp.Message) (File, error)

func (File) HasKey

func (s File) HasKey() bool

func (File) HasParent

func (s File) HasParent() bool

func (File) Key

func (s File) Key() ([]byte, error)

func (File) Parent

func (s File) Parent() (string, error)

func (File) ParentBytes

func (s File) ParentBytes() ([]byte, error)

func (File) SetKey

func (s File) SetKey(v []byte) error

func (File) SetParent

func (s File) SetParent(v string) error

func (File) SetSize

func (s File) SetSize(v uint64)

func (File) Size

func (s File) Size() uint64

func (File) String

func (s File) String() string

type File_List

type File_List struct{ capnp.List }

File_List is a list of File.

func NewFile_List

func NewFile_List(s *capnp.Segment, sz int32) (File_List, error)

NewFile creates a new list of File.

func (File_List) At

func (s File_List) At(i int) File

func (File_List) Set

func (s File_List) Set(i int, v File) error

func (File_List) String

func (s File_List) String() string

type File_Promise

type File_Promise struct{ *capnp.Pipeline }

File_Promise is a wrapper for a File promised by a client call.

func (File_Promise) Struct

func (p File_Promise) Struct() (File, error)

type Ghost

type Ghost struct{ capnp.Struct }

Ghost indicates that a certain node was at this path once

func NewGhost

func NewGhost(s *capnp.Segment) (Ghost, error)

func NewRootGhost

func NewRootGhost(s *capnp.Segment) (Ghost, error)

func ReadRootGhost

func ReadRootGhost(msg *capnp.Message) (Ghost, error)

func (Ghost) Commit

func (s Ghost) Commit() (Commit, error)

func (Ghost) Directory

func (s Ghost) Directory() (Directory, error)

func (Ghost) File

func (s Ghost) File() (File, error)

func (Ghost) GhostInode

func (s Ghost) GhostInode() uint64

func (Ghost) GhostPath

func (s Ghost) GhostPath() (string, error)

func (Ghost) GhostPathBytes

func (s Ghost) GhostPathBytes() ([]byte, error)

func (Ghost) HasCommit

func (s Ghost) HasCommit() bool

func (Ghost) HasDirectory

func (s Ghost) HasDirectory() bool

func (Ghost) HasFile

func (s Ghost) HasFile() bool

func (Ghost) HasGhostPath

func (s Ghost) HasGhostPath() bool

func (Ghost) NewCommit

func (s Ghost) NewCommit() (Commit, error)

NewCommit sets the commit field to a newly allocated Commit struct, preferring placement in s's segment.

func (Ghost) NewDirectory

func (s Ghost) NewDirectory() (Directory, error)

NewDirectory sets the directory field to a newly allocated Directory struct, preferring placement in s's segment.

func (Ghost) NewFile

func (s Ghost) NewFile() (File, error)

NewFile sets the file field to a newly allocated File struct, preferring placement in s's segment.

func (Ghost) SetCommit

func (s Ghost) SetCommit(v Commit) error

func (Ghost) SetDirectory

func (s Ghost) SetDirectory(v Directory) error

func (Ghost) SetFile

func (s Ghost) SetFile(v File) error

func (Ghost) SetGhostInode

func (s Ghost) SetGhostInode(v uint64)

func (Ghost) SetGhostPath

func (s Ghost) SetGhostPath(v string) error

func (Ghost) String

func (s Ghost) String() string

func (Ghost) Which

func (s Ghost) Which() Ghost_Which

type Ghost_List

type Ghost_List struct{ capnp.List }

Ghost_List is a list of Ghost.

func NewGhost_List

func NewGhost_List(s *capnp.Segment, sz int32) (Ghost_List, error)

NewGhost creates a new list of Ghost.

func (Ghost_List) At

func (s Ghost_List) At(i int) Ghost

func (Ghost_List) Set

func (s Ghost_List) Set(i int, v Ghost) error

func (Ghost_List) String

func (s Ghost_List) String() string

type Ghost_Promise

type Ghost_Promise struct{ *capnp.Pipeline }

Ghost_Promise is a wrapper for a Ghost promised by a client call.

func (Ghost_Promise) Commit

func (p Ghost_Promise) Commit() Commit_Promise

func (Ghost_Promise) Directory

func (p Ghost_Promise) Directory() Directory_Promise

func (Ghost_Promise) File

func (p Ghost_Promise) File() File_Promise

func (Ghost_Promise) Struct

func (p Ghost_Promise) Struct() (Ghost, error)

type Ghost_Which

type Ghost_Which uint16
const (
	Ghost_Which_commit    Ghost_Which = 0
	Ghost_Which_directory Ghost_Which = 1
	Ghost_Which_file      Ghost_Which = 2
)

func (Ghost_Which) String

func (w Ghost_Which) String() string

type Node

type Node struct{ capnp.Struct }

Node is a node in the merkle dag of brig

func NewNode

func NewNode(s *capnp.Segment) (Node, error)

func NewRootNode

func NewRootNode(s *capnp.Segment) (Node, error)

func ReadRootNode

func ReadRootNode(msg *capnp.Message) (Node, error)

func (Node) BackendHash

func (s Node) BackendHash() ([]byte, error)

func (Node) Commit

func (s Node) Commit() (Commit, error)

func (Node) ContentHash

func (s Node) ContentHash() ([]byte, error)

func (Node) Directory

func (s Node) Directory() (Directory, error)

func (Node) File

func (s Node) File() (File, error)

func (Node) Ghost

func (s Node) Ghost() (Ghost, error)

func (Node) HasBackendHash

func (s Node) HasBackendHash() bool

func (Node) HasCommit

func (s Node) HasCommit() bool

func (Node) HasContentHash

func (s Node) HasContentHash() bool

func (Node) HasDirectory

func (s Node) HasDirectory() bool

func (Node) HasFile

func (s Node) HasFile() bool

func (Node) HasGhost

func (s Node) HasGhost() bool

func (Node) HasModTime

func (s Node) HasModTime() bool

func (Node) HasName

func (s Node) HasName() bool

func (Node) HasTreeHash

func (s Node) HasTreeHash() bool

func (Node) HasUser

func (s Node) HasUser() bool

func (Node) Inode

func (s Node) Inode() uint64

func (Node) ModTime

func (s Node) ModTime() (string, error)

func (Node) ModTimeBytes

func (s Node) ModTimeBytes() ([]byte, error)

func (Node) Name

func (s Node) Name() (string, error)

func (Node) NameBytes

func (s Node) NameBytes() ([]byte, error)

func (Node) NewCommit

func (s Node) NewCommit() (Commit, error)

NewCommit sets the commit field to a newly allocated Commit struct, preferring placement in s's segment.

func (Node) NewDirectory

func (s Node) NewDirectory() (Directory, error)

NewDirectory sets the directory field to a newly allocated Directory struct, preferring placement in s's segment.

func (Node) NewFile

func (s Node) NewFile() (File, error)

NewFile sets the file field to a newly allocated File struct, preferring placement in s's segment.

func (Node) NewGhost

func (s Node) NewGhost() (Ghost, error)

NewGhost sets the ghost field to a newly allocated Ghost struct, preferring placement in s's segment.

func (Node) SetBackendHash

func (s Node) SetBackendHash(v []byte) error

func (Node) SetCommit

func (s Node) SetCommit(v Commit) error

func (Node) SetContentHash

func (s Node) SetContentHash(v []byte) error

func (Node) SetDirectory

func (s Node) SetDirectory(v Directory) error

func (Node) SetFile

func (s Node) SetFile(v File) error

func (Node) SetGhost

func (s Node) SetGhost(v Ghost) error

func (Node) SetInode

func (s Node) SetInode(v uint64)

func (Node) SetModTime

func (s Node) SetModTime(v string) error

func (Node) SetName

func (s Node) SetName(v string) error

func (Node) SetTreeHash

func (s Node) SetTreeHash(v []byte) error

func (Node) SetUser

func (s Node) SetUser(v string) error

func (Node) String

func (s Node) String() string

func (Node) TreeHash

func (s Node) TreeHash() ([]byte, error)

func (Node) User

func (s Node) User() (string, error)

func (Node) UserBytes

func (s Node) UserBytes() ([]byte, error)

func (Node) Which

func (s Node) Which() Node_Which

type Node_List

type Node_List struct{ capnp.List }

Node_List is a list of Node.

func NewNode_List

func NewNode_List(s *capnp.Segment, sz int32) (Node_List, error)

NewNode creates a new list of Node.

func (Node_List) At

func (s Node_List) At(i int) Node

func (Node_List) Set

func (s Node_List) Set(i int, v Node) error

func (Node_List) String

func (s Node_List) String() string

type Node_Promise

type Node_Promise struct{ *capnp.Pipeline }

Node_Promise is a wrapper for a Node promised by a client call.

func (Node_Promise) Commit

func (p Node_Promise) Commit() Commit_Promise

func (Node_Promise) Directory

func (p Node_Promise) Directory() Directory_Promise

func (Node_Promise) File

func (p Node_Promise) File() File_Promise

func (Node_Promise) Ghost

func (p Node_Promise) Ghost() Ghost_Promise

func (Node_Promise) Struct

func (p Node_Promise) Struct() (Node, error)

type Node_Which

type Node_Which uint16
const (
	Node_Which_commit    Node_Which = 0
	Node_Which_directory Node_Which = 1
	Node_Which_file      Node_Which = 2
	Node_Which_ghost     Node_Which = 3
)

func (Node_Which) String

func (w Node_Which) String() string

Jump to

Keyboard shortcuts

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