Documentation ¶
Overview ¶
Package storage defines interfaces for content storage, message storage and codecs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ContentReader ¶
ContentReader is responsible for fetching content based on it's CID.
type ContentStorage ¶
type ContentStorage interface { ContentReader ContentWriter }
ContentStorage allows its user to access content based on CID.
type ContentWriter ¶
ContentWriter writes given content with assigned CID
type Decoder ¶ added in v1.1.1
type Decoder interface {
Decode(message RawMessage) ProtoDecodable
}
type Encoder ¶ added in v1.1.1
type Encoder interface {
Encode(message proto.Message) (RawMessage, error)
}
Encoder
type MessageReader ¶
type MessageReader interface {
Read(ctx context.Context, cid cid.Cid) (ProtoDecodable, error)
}
type MessageStorage ¶
type MessageStorage interface { MessageReader MessageWriter }
type MessageWriter ¶
type ProtoDecodable ¶ added in v1.1.1
ProtoDecodable can be used to deserialize message data to proto structure todo: refactor this to just passing generic type when go 1.18 is out
type RawMessage ¶ added in v1.1.1
type RawMessage []byte
Directories ¶
Path | Synopsis |
---|---|
content
|
|
localfs
Package localfs implements a content storage based on local file system.
|
Package localfs implements a content storage based on local file system. |
memory
Package memory defines an in-memory content storage.
|
Package memory defines an in-memory content storage. |
Package messagestorage defines a storage wrapper for handling PDCL messages.
|
Package messagestorage defines a storage wrapper for handling PDCL messages. |
ipfs
Package ipfs defines a storage based on InterPlanetary File System.
|
Package ipfs defines a storage based on InterPlanetary File System. |
Package pbcoded provides codecs for (de)serializing messages.
|
Package pbcoded provides codecs for (de)serializing messages. |
Click to show internal directories.
Click to hide internal directories.