git ssb

10+

Matt McKegg / patchwork



Tree: 43326622502c853b045d9b3f486b1631c8a5e93a

Files: 43326622502c853b045d9b3f486b1631c8a5e93a / sbot / index.js

987 bytesRaw
1var Channels = require('./channels')
2var Subscriptions = require('./subscriptions')
3var Roots = require('./roots')
4var Progress = require('./progress')
5var Search = require('./search')
6
7exports.name = 'patchwork'
8exports.version = require('../package.json').version
9exports.manifest = {
10 channels: 'source',
11 subscriptions: 'source',
12 roots: 'source',
13 latest: 'source',
14 linearSearch: 'source',
15 progress: 'source',
16 getSubscriptions: 'async',
17 getChannels: 'async'
18}
19
20exports.init = function (ssb, config) {
21 var progress = Progress(ssb, config)
22 var channels = Channels(ssb, config)
23 var subscriptions = Subscriptions(ssb, config)
24 var roots = Roots(ssb, config)
25 var search = Search(ssb, config)
26
27 return {
28 channels: channels.stream,
29 subscriptions: subscriptions.stream,
30 roots: roots.read,
31 latest: roots.latest,
32 progress: progress.stream,
33 linearSearch: search.linear,
34 getSubscriptions: subscriptions.get,
35 getChannels: channels.get
36 }
37}
38

Built with git-ssb-web