Versions in this module Expand all Collapse all v1 v1.0.1 Oct 17, 2020 Changes in this version + func CreateEvent(ctx context.Context, dag format.DAGService, body format.Node, ...) (net.Event, error) + func CreateRecord(ctx context.Context, dag format.DAGService, config CreateRecordConfig) (net.Record, error) + func DecodeBlock(block blocks.Block, key crypto.DecryptionKey) (format.Node, error) + func EncodeBlock(block blocks.Block, key crypto.EncryptionKey) (format.Node, error) + func GetEvent(ctx context.Context, dag format.DAGService, id cid.Cid) (net.Event, error) + func GetRecord(ctx context.Context, dag format.DAGService, id cid.Cid, ...) (net.Record, error) + func RecordFromNode(coded format.Node, key crypto.DecryptionKey) (net.Record, error) + func RecordFromProto(rec *pb.Log_Record, key crypto.DecryptionKey) (net.Record, error) + func RecordToProto(ctx context.Context, dag format.DAGService, rec net.Record) (*pb.Log_Record, error) + func RemoveEvent(ctx context.Context, dag format.DAGService, e *Event) error + func RemoveRecord(ctx context.Context, dag format.DAGService, rec net.Record) error + type CreateRecordConfig struct + Block format.Node + Key ic.PrivKey + Prev cid.Cid + PubKey thread.PubKey + ServiceKey crypto.EncryptionKey + type Event struct + func EventFromNode(node format.Node) (*Event, error) + func EventFromRecord(ctx context.Context, dag format.DAGService, rec net.Record) (*Event, error) + func (e *Event) BodyID() cid.Cid + func (e *Event) GetBody(ctx context.Context, dag format.DAGService, key crypto.DecryptionKey) (format.Node, error) + func (e *Event) GetHeader(ctx context.Context, dag format.DAGService, key crypto.DecryptionKey) (net.EventHeader, error) + func (e *Event) HeaderID() cid.Cid + type EventHeader struct + func (h *EventHeader) Key() (crypto.DecryptionKey, error) + type Record struct + func (r *Record) BlockID() cid.Cid + func (r *Record) GetBlock(ctx context.Context, dag format.DAGService) (format.Node, error) + func (r *Record) PrevID() cid.Cid + func (r *Record) PubKey() []byte + func (r *Record) Sig() []byte + func (r *Record) Verify(key ic.PubKey) error