git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Tree: ed9add9c301f7f06b62492824e07772071cc5719

Files: ed9add9c301f7f06b62492824e07772071cc5719 / sbot / index.js

1427 bytesRaw
1var Channels = require('./channels')
2var Heartbeat = require('./heartbeat')
3var Subscriptions = require('./subscriptions')
4var Roots = require('./roots')
5var Progress = require('./progress')
6var Search = require('./search')
7var RecentFeeds = require('./recent-feeds')
8var LiveBacklinks = require('./live-backlinks')
9
10exports.name = 'patchwork'
11exports.version = require('../package.json').version
12exports.manifest = {
13 channels: 'source',
14 subscriptions: 'source',
15 roots: 'source',
16 latest: 'source',
17 linearSearch: 'source',
18 progress: 'source',
19 recentFeeds: 'source',
20 getSubscriptions: 'async',
21 getChannels: 'async',
22 heartbeat: 'source',
23 liveBacklinks: {
24 subscribe: 'sync',
25 unsubscribe: 'sync',
26 stream: 'source'
27 }
28}
29
30exports.init = function (ssb, config) {
31 var progress = Progress(ssb, config)
32 var channels = Channels(ssb, config)
33 var subscriptions = Subscriptions(ssb, config)
34 var roots = Roots(ssb, config)
35 var search = Search(ssb, config)
36 var recentFeeds = RecentFeeds(ssb, config)
37
38 return {
39 heartbeat: Heartbeat(ssb, config),
40 channels: channels.stream,
41 subscriptions: subscriptions.stream,
42 roots: roots.read,
43 latest: roots.latest,
44 progress: progress.stream,
45 recentFeeds: recentFeeds.stream,
46 linearSearch: search.linear,
47 getSubscriptions: subscriptions.get,
48 getChannels: channels.get,
49 liveBacklinks: LiveBacklinks(ssb, config)
50 }
51}
52

Built with git-ssb-web