Register registers a plugin
(p Base)
| 53 | |
| 54 | // Register registers a plugin |
| 55 | func Register(p Base) { |
| 56 | registerBase(p) |
| 57 | |
| 58 | if _, ok := p.(Config); ok { |
| 59 | registerConfig(p.(Config)) |
| 60 | } |
| 61 | |
| 62 | if _, ok := p.(UserConfig); ok { |
| 63 | registerUserConfig(p.(UserConfig)) |
| 64 | } |
| 65 | |
| 66 | if _, ok := p.(Connector); ok { |
| 67 | registerConnector(p.(Connector)) |
| 68 | } |
| 69 | |
| 70 | if _, ok := p.(Parser); ok { |
| 71 | registerParser(p.(Parser)) |
| 72 | } |
| 73 | |
| 74 | if _, ok := p.(Filter); ok { |
| 75 | registerFilter(p.(Filter)) |
| 76 | } |
| 77 | |
| 78 | if _, ok := p.(Storage); ok { |
| 79 | registerStorage(p.(Storage)) |
| 80 | } |
| 81 | |
| 82 | if _, ok := p.(Cache); ok { |
| 83 | registerCache(p.(Cache)) |
| 84 | } |
| 85 | |
| 86 | if _, ok := p.(UserCenter); ok { |
| 87 | registerUserCenter(p.(UserCenter)) |
| 88 | } |
| 89 | |
| 90 | if _, ok := p.(Agent); ok { |
| 91 | registerAgent(p.(Agent)) |
| 92 | } |
| 93 | |
| 94 | if _, ok := p.(Search); ok { |
| 95 | registerSearch(p.(Search)) |
| 96 | } |
| 97 | |
| 98 | if _, ok := p.(Notification); ok { |
| 99 | registerNotification(p.(Notification)) |
| 100 | } |
| 101 | |
| 102 | if _, ok := p.(Reviewer); ok { |
| 103 | registerReviewer(p.(Reviewer)) |
| 104 | } |
| 105 | |
| 106 | if _, ok := p.(Captcha); ok { |
| 107 | registerCaptcha(p.(Captcha)) |
| 108 | } |
| 109 | |
| 110 | if _, ok := p.(Embed); ok { |
| 111 | registerEmbed(p.(Embed)) |
| 112 | } |
no outgoing calls