Documentation ¶
Index ¶
- type ContentMetatag
- type DownloaderTask
- type GroupMetadata
- type Manager
- func (m *Manager) Close() error
- func (m *Manager) CreateGroup(name string, ownerID peer.ID, ownerPrivateKey ic.PrivKey) (*GroupMetadata, error)
- func (m *Manager) CreateOpenGroup(name string, ownerID peer.ID, ownerPrivateKey ic.PrivKey) (*GroupMetadata, error)
- func (m *Manager) Delete(key datastore.Key) error
- func (m *Manager) DownloadManagerStatus() (res map[string]taskmanager.TaskStatus)
- func (m *Manager) FindTag(tag string) (*ContentMetatag, error)
- func (m *Manager) Get(key datastore.Key) ([]byte, error)
- func (m *Manager) GetAllCids() ([]cid.Cid, error)
- func (m *Manager) GetAllTags() ([]string, error)
- func (m *Manager) GroupAddContent(peerId, groupID peer.ID, privateKey ic.PrivKey, meta *ContentMetatag) error
- func (m *Manager) GroupAddMember(memberPeerId, newMemberPeerId, groupID peer.ID, memberPrivateKey ic.PrivKey, ...) error
- func (m *Manager) GroupGetAllContent(peerId, groupID peer.ID, privateKey ic.PrivKey) ([]*ContentMetatag, error)
- func (m *Manager) GroupGetAllGroups(ownerID peer.ID, ownerPrivateKey ic.PrivKey) ([]GroupMetadata, error)
- func (m *Manager) GroupGetInfo(memberPeerId, groupID peer.ID, memberPrivateKey ic.PrivKey) (*GroupMetadata, error)
- func (m *Manager) Has(key datastore.Key) (bool, error)
- func (m *Manager) Index() (map[string]*ContentMetatag, error)
- func (m *Manager) Put(key datastore.Key, v []byte) error
- func (m *Manager) StartContentWatcher()
- func (m *Manager) StartUnfinishedDownload(pid peer.ID)
- func (m *Manager) Tag(tag string, meta *ContentMetatag) error
- type PubKeyGetter
- type Syncer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentMetatag ¶ added in v0.0.16
type ContentMetatag struct { Tag string Size int64 Type string Name string Hash cid.Cid Timestamp int64 Owner peer.ID IsEncrypted bool Group string `json:"omitempty"` Links []*format.Link }
ContentMetatag keeps meta information of a content in the crdt store
type DownloaderTask ¶ added in v0.0.12
type DownloaderTask struct {
// contains filtered or unexported fields
}
func (*DownloaderTask) Execute ¶ added in v0.0.12
func (d *DownloaderTask) Execute(ctx context.Context) error
func (*DownloaderTask) Name ¶ added in v0.0.12
func (d *DownloaderTask) Name() string
type GroupMetadata ¶ added in v0.0.16
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles replication
func New ¶
func New( ctx context.Context, cancel context.CancelFunc, r repo.Repo, h host.Host, dagSyncer crdt.DAGSyncer, st datastore.Batching, prefix string, topic string, broadcastInterval time.Duration, syncer Syncer, pubKeyGetter PubKeyGetter, autoDownload bool, ) (*Manager, error)
New creates a new replication manager
func (*Manager) CreateGroup ¶ added in v0.0.16
func (*Manager) CreateOpenGroup ¶ added in v0.0.16
func (*Manager) DownloadManagerStatus ¶ added in v0.0.12
func (m *Manager) DownloadManagerStatus() (res map[string]taskmanager.TaskStatus)
DownloadManagerStatus returns taskmanager status for handling downloads
func (*Manager) FindTag ¶
func (m *Manager) FindTag(tag string) (*ContentMetatag, error)
FindTag gets the meta info of a given tag from the store
func (*Manager) Get ¶
Get retrieves the object `value` named by `key`. Get will return ErrNotFound if the key is not mapped to a value.
func (*Manager) GetAllCids ¶
GetAllCids returns all the cids in the crdt store
func (*Manager) GetAllTags ¶
GetAllTags returns all tags
func (*Manager) GroupAddContent ¶ added in v0.0.16
func (*Manager) GroupAddMember ¶ added in v0.0.16
func (*Manager) GroupGetAllContent ¶ added in v0.0.16
func (*Manager) GroupGetAllGroups ¶ added in v0.0.16
func (*Manager) GroupGetInfo ¶ added in v0.0.16
func (*Manager) Index ¶ added in v0.0.11
func (m *Manager) Index() (map[string]*ContentMetatag, error)
Index returns the tag-mata info as key:value
func (*Manager) StartContentWatcher ¶
func (m *Manager) StartContentWatcher()
StartContentWatcher watches on incoming contents and gets content in datastore
func (*Manager) StartUnfinishedDownload ¶ added in v0.0.12
StartUnfinishedDownload starts unfinished downloads once peer comes back
type PubKeyGetter ¶ added in v0.0.16
PubKeyGetter