Documentation ¶
Index ¶
- Constants
- Variables
- func CreateCidLink(hash []byte) cidlink.Link
- func DagCborRead(s Storage) func(*gin.Context)
- func DagJsonRead(s Storage, exchange graphsync.GraphExchange, pi *peer.AddrInfo) func(*gin.Context)
- func Decode(proto datamodel.NodePrototype, src string) (datamodel.Node, error)
- func DecodeCBOR(proto datamodel.NodePrototype, src []byte) (datamodel.Node, error)
- func Encode(n datamodel.Node) (string, error)
- func EncodeCBOR(n datamodel.Node) ([]byte, error)
- func FromJSON(j string) interface{}
- func GetDagCBORLinkPrototype() ipld.LinkPrototype
- func GetDagEthereumLinkPrototype(codec string) ipld.LinkPrototype
- func GetDagJOSELinkPrototype() ipld.LinkPrototype
- func GetDagJSONLinkPrototype() ipld.LinkPrototype
- func GetDataContractEnvironment() *cel.Env
- func GetDataContractGlobals(jsonArgs, did, payload string) map[string]interface{}
- func GetLinkPrototype() ipld.LinkPrototype
- func GetRawLinkPrototype() ipld.LinkPrototype
- func MockGetDataContract() string
- func MockSetOutputSignature() bool
- func NewAgent(ctx context.Context, gsynchost host.Host, router string) gsync.GraphExchange
- func NewEdge(ctx context.Context, gsynchost host.Host, router string) string
- func NewRouter(ctx context.Context, gsynchost host.Host, lsys linking.LinkSystem, ...) (gsync.GraphExchange, *peer.AddrInfo)
- func NewSchemaFrom(schemaBytes []byte) (*graphql.Schema, error)
- func ParseCidLink(hash string) (cidlink.Link, error)
- func QueryGraphQL(s Storage) func(*gin.Context)
- func ReadFromStore(s Storage, hash string, path string) (string, error)
- func ValueToJSON(val ref.Val) string
- type DagCompute
- type Storage
- func (k *Storage) Load(linkCtx ipld.LinkContext, link datamodel.Link) (datamodel.Node, error)
- func (k *Storage) Store(linkCtx ipld.LinkContext, node datamodel.Node) datamodel.Link
- func (k *Storage) StoreDagCBOR(linkCtx ipld.LinkContext, node datamodel.Node) datamodel.Link
- func (k *Storage) StoreDagEth(linkCtx ipld.LinkContext, node datamodel.Node, codecFormat string) datamodel.Link
- func (k *Storage) StoreRaw(linkCtx ipld.LinkContext, node datamodel.Node) datamodel.Link
Constants ¶
const (
LINK_PROTO_VERSION = 1
)
Variables ¶
eth-block ipld 0x90 permanent Ethereum Header (RLP) eth-block-list ipld 0x91 permanent Ethereum Header List (RLP) eth-tx-trie ipld 0x92 permanent Ethereum Transaction Trie (Eth-Trie) eth-tx ipld 0x93 permanent Ethereum Transaction (MarshalBinary) eth-tx-receipt-trie ipld 0x94 permanent Ethereum Transaction Receipt Trie (Eth-Trie) eth-tx-receipt ipld 0x95 permanent Ethereum Transaction Receipt (MarshalBinary) eth-state-trie ipld 0x96 permanent Ethereum State Trie (Eth-Secure-Trie) eth-account-snapshot ipld 0x97 permanent Ethereum Account Snapshot (RLP) eth-storage-trie ipld 0x98 permanent Ethereum Contract Storage Trie (Eth-Secure-Trie) eth-receipt-log-trie ipld 0x99 draft Ethereum Transaction Receipt Log Trie (Eth-Trie) eth-reciept-log ipld 0x9a draft Ethereum Transaction Receipt Log (RLP)
Functions ¶
func CreateCidLink ¶ added in v0.1.1
CreateCidLink takes a hash eg ethereum hash and converts it to cid multihash
func DagCborRead ¶ added in v0.1.1
func DagJsonRead ¶ added in v0.1.1
func DecodeCBOR ¶ added in v0.1.1
func GetDagCBORLinkPrototype ¶ added in v0.1.1
func GetDagCBORLinkPrototype() ipld.LinkPrototype
func GetDagEthereumLinkPrototype ¶ added in v0.1.1
func GetDagEthereumLinkPrototype(codec string) ipld.LinkPrototype
func GetDagJOSELinkPrototype ¶ added in v0.1.1
func GetDagJOSELinkPrototype() ipld.LinkPrototype
func GetDagJSONLinkPrototype ¶ added in v0.1.1
func GetDagJSONLinkPrototype() ipld.LinkPrototype
func GetDataContractEnvironment ¶ added in v0.1.1
func GetDataContractGlobals ¶ added in v0.1.1
func GetLinkPrototype ¶ added in v0.1.1
func GetLinkPrototype() ipld.LinkPrototype
func GetRawLinkPrototype ¶ added in v0.1.1
func GetRawLinkPrototype() ipld.LinkPrototype
func MockGetDataContract ¶ added in v0.1.1
func MockGetDataContract() string
func MockSetOutputSignature ¶ added in v0.1.1
func MockSetOutputSignature() bool
func NewSchemaFrom ¶ added in v0.1.1
func ParseCidLink ¶ added in v0.1.1
ParseCidLink parses a string cid multihash into a cidLink
func QueryGraphQL ¶ added in v0.1.1
func ReadFromStore ¶ added in v0.1.1
func ValueToJSON ¶ added in v0.1.1
From: https://github.com/google/cel-go/blob/master/codelab/solution/codelab.go valueToJSON converts the CEL type to a protobuf JSON representation and marshals the result to a string.
Types ¶
type DagCompute ¶ added in v0.1.1
type DagCompute struct { // dagContract string Storage Storage }
func (DagCompute) ExecuteDataContractTransaction ¶ added in v0.1.1
func (DagCompute) ReadFromStore ¶ added in v0.1.1
func (d DagCompute) ReadFromStore(hash string, path string) (string, error)
type Storage ¶ added in v0.1.1
type Storage struct { DataStore fsstore.Store LinkSystem linking.LinkSystem }
func NewStorage ¶ added in v0.1.1
func (*Storage) StoreDagCBOR ¶ added in v0.1.1
Store node as dag-cbor