chore(no-torrent)_: Created nil structs for Mobile use

This commit is contained in:
Samuel Hawksby-Robinson 2024-06-04 00:30:56 +01:00
parent f0ac9715e8
commit 9ec8cdf3d8
3 changed files with 125 additions and 0 deletions

View File

@ -0,0 +1,43 @@
package communities
import (
"crypto/ecdsa"
"time"
"github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/protocol/protobuf"
)
type ArchiveManagerMobile struct{}
func (amm *ArchiveManagerMobile) CreateHistoryArchiveTorrentFromMessages(communityID types.HexBytes, messages []*types.Message, topics []types.TopicType, startDate time.Time, endDate time.Time, partition time.Duration, encrypt bool) ([]string, error) {
return nil, nil
}
func (amm *ArchiveManagerMobile) CreateHistoryArchiveTorrentFromDB(communityID types.HexBytes, topics []types.TopicType, startDate time.Time, endDate time.Time, partition time.Duration, encrypt bool) ([]string, error) {
return nil, nil
}
func (amm *ArchiveManagerMobile) SaveMessageArchiveID(communityID types.HexBytes, hash string) error {
return nil
}
func (amm *ArchiveManagerMobile) GetMessageArchiveIDsToImport(communityID types.HexBytes) ([]string, error) {
return nil, nil
}
func (amm *ArchiveManagerMobile) SetMessageArchiveIDImported(communityID types.HexBytes, hash string, imported bool) error {
return nil
}
func (amm *ArchiveManagerMobile) ExtractMessagesFromHistoryArchive(communityID types.HexBytes, archiveID string) ([]*protobuf.WakuMessage, error) {
return nil, nil
}
func (amm *ArchiveManagerMobile) GetHistoryArchiveMagnetlink(communityID types.HexBytes) (string, error) {
return "", nil
}
func (amm *ArchiveManagerMobile) LoadHistoryArchiveIndexFromFile(myKey *ecdsa.PrivateKey, communityID types.HexBytes) (*protobuf.WakuMessageArchiveIndex, error) {
return nil, nil
}

View File

@ -0,0 +1,82 @@
package communities
import (
"time"
"github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/params"
"github.com/status-im/status-go/protocol/transport"
"go.uber.org/zap"
)
type TorrentManagerMobile struct {
ArchiveManagerMobile
logger *zap.Logger
}
func (tmm *TorrentManagerMobile) LogStdout(input string, fields ...zap.Field) {
tmm.logger.Debug(input, fields...)
}
func (tmm *TorrentManagerMobile) SetOnline(online bool) {}
func (tmm *TorrentManagerMobile) SetTorrentConfig(*params.TorrentConfig) {}
func (tmm *TorrentManagerMobile) StartTorrentClient() error {
return nil
}
func (tmm *TorrentManagerMobile) Stop() error {
return nil
}
func (tmm *TorrentManagerMobile) IsReady() bool {
return false
}
func (tmm *TorrentManagerMobile) GetCommunityChatsFilters(communityID types.HexBytes) ([]*transport.Filter, error) {
return nil, nil
}
func (tmm *TorrentManagerMobile) GetCommunityChatsTopics(communityID types.HexBytes) ([]types.TopicType, error) {
return nil, nil
}
func (tmm *TorrentManagerMobile) GetHistoryArchivePartitionStartTimestamp(communityID types.HexBytes) (uint64, error) {
return 0, nil
}
func (tmm *TorrentManagerMobile) CreateAndSeedHistoryArchive(communityID types.HexBytes, topics []types.TopicType, startDate time.Time, endDate time.Time, partition time.Duration, encrypt bool) error {
return nil
}
func (tmm *TorrentManagerMobile) StartHistoryArchiveTasksInterval(community *Community, interval time.Duration) {
}
func (tmm *TorrentManagerMobile) StopHistoryArchiveTasksInterval(communityID types.HexBytes) {}
func (tmm *TorrentManagerMobile) SeedHistoryArchiveTorrent(communityID types.HexBytes) error {
return nil
}
func (tmm *TorrentManagerMobile) UnseedHistoryArchiveTorrent(communityID types.HexBytes) {}
func (tmm *TorrentManagerMobile) IsSeedingHistoryArchiveTorrent(communityID types.HexBytes) bool {
return false
}
func (tmm *TorrentManagerMobile) GetHistoryArchiveDownloadTask(communityID string) *HistoryArchiveDownloadTask {
return nil
}
func (tmm *TorrentManagerMobile) AddHistoryArchiveDownloadTask(communityID string, task *HistoryArchiveDownloadTask) {
}
func (tmm *TorrentManagerMobile) DownloadHistoryArchivesByMagnetlink(communityID types.HexBytes, magnetlink string, cancelTask chan struct{}) (*HistoryArchiveDownloadTaskInfo, error) {
return nil, nil
}
func (tmm *TorrentManagerMobile) TorrentFileExists(communityID string) bool {
return false
}