Commit Graph

4 Commits

Author SHA1 Message Date
Paul van Tilburg fa8fc40b58
Add missing trait derives on back-end types 2022-08-15 21:07:53 +02:00
Paul van Tilburg 76f1e01657
Make channel/item image optional; change item length type
This allows more back-ends to be compatible.
2022-08-15 20:22:15 +02:00
Paul van Tilburg 49e0e47ba2
Introduce enum and enum dispatching for backends
This way handlers don't need to do case matching on backend ID strings
anymore.

* Rename `backend` to `backend_id` where we have a backend ID
* Add `get` function and `Backends` enum to the `backend` module
* Add a depend on the `enum_dispatch` crate
2022-08-15 20:21:42 +02:00
Paul van Tilburg bc9a9e307d
Add back-end abstraction; refactor Mixcloud back-end (closes: #10)
* Add a `backend` module `Backend` trait and necessary abstract types
* Refactor handlers to use the back-end abstraction
* Directly serialize to URLs where necessary in Mixcloud back-end
* Require `serde` feature for the url crate
2022-08-14 09:03:58 +02:00