git ssb

10+

Matt McKegg / patchwork



Tree: 20cee95636c3adc788f738eff9c79fb6477c66d4

Files: 20cee95636c3adc788f738eff9c79fb6477c66d4 / 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