mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-02-03 00:39:39 +00:00
Example of potential plugin implementation
This commit is contained in:
parent
71b943f434
commit
62bd7e73f4
15 changed files with 347 additions and 7 deletions
20
server/PluginAbstract.js
Normal file
20
server/PluginAbstract.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
class PluginAbstract {
|
||||
constructor() {
|
||||
if (this.constructor === PluginAbstract) {
|
||||
throw new Error('Cannot instantiate abstract class')
|
||||
}
|
||||
}
|
||||
|
||||
init() {
|
||||
throw new Error('Method "init()" not implemented')
|
||||
}
|
||||
|
||||
onAction() {
|
||||
throw new Error('Method "onAction()" not implemented')
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
throw new Error('Method "onDestroy()" not implemented')
|
||||
}
|
||||
}
|
||||
module.exports = PluginAbstract
|
||||
Loading…
Add table
Add a link
Reference in a new issue