| 1 | package Rhetoric::Storage::CouchDB; | ||
| 2 | use common::sense; | ||
| 3 | use aliased 'Squatting::H'; | ||
| 4 | |||
| 5 | use AnyEvent::CouchDB; | ||
| 6 | use Method::Signatures::Simple; | ||
| 7 | |||
| 8 | use Rhetoric::Helpers ':all'; | ||
| 9 | |||
| 10 | our $storage = H->new({ | ||
| 11 | init => method { | ||
| 12 | }, | ||
| 13 | meta => method($key, $value) { | ||
| 14 | }, | ||
| 15 | new_post => method($post) { | ||
| 16 | }, | ||
| 17 | post => method($post) { | ||
| 18 | }, | ||
| 19 | posts => method($year, $month, $slug) { | ||
| 20 | }, | ||
| 21 | categories => method { | ||
| 22 | }, | ||
| 23 | category_posts => method { | ||
| 24 | }, | ||
| 25 | archives => method { | ||
| 26 | }, | ||
| 27 | archive_posts => method($year, $month) { | ||
| 28 | }, | ||
| 29 | comments => method($post) { | ||
| 30 | }, | ||
| 31 | new_comment => method($year, $month, $slug, $comment) { | ||
| 32 | }, | ||
| 33 | }); | ||
| 34 | |||
| 35 | 1; | ||
| 36 | |||
| 37 | __END__ |