Some checks failed
Build and Release / Create Release (push) Successful in 0s
Build and Release / Lint (push) Failing after 4m23s
Build and Release / Build Binaries (amd64, darwin, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (arm64, darwin, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (arm64, linux, linux-latest) (push) Has been skipped
Build and Release / Integration Tests (PostgreSQL) (push) Has been cancelled
Build and Release / Unit Tests (push) Has been cancelled
- Add modules/plugins/loader.go to load .so plugins from plugins directory - Add modules/setting/plugins.go for [plugins] configuration section - Wire up plugin loading before DB init so plugins can register models - Wire up plugin migrations and initialization after DB init - Register plugin routes in web.go Plugins can now be loaded at runtime by placing .so files in the plugins directory and enabling [plugins] ENABLED = true in app.ini. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
22 lines
481 B
Go
22 lines
481 B
Go
// Copyright 2026 MarketAlly. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package setting
|
|
|
|
// Plugins settings
|
|
var (
|
|
Plugins = struct {
|
|
Enabled bool
|
|
Path string
|
|
}{
|
|
Enabled: false, // Disabled by default
|
|
Path: "", // Empty means default to APP_DATA_PATH/plugins
|
|
}
|
|
)
|
|
|
|
func loadPluginsFrom(rootCfg ConfigProvider) {
|
|
sec := rootCfg.Section("plugins")
|
|
Plugins.Enabled = sec.Key("ENABLED").MustBool(false)
|
|
Plugins.Path = sec.Key("PATH").MustString("")
|
|
}
|