yao/share/app.go
Max 8523170992 Implement system store management and enhance store loading functionality
- Introduced a new system store management feature, allowing for the loading of predefined system stores such as cache and OAuth client stores.
- Added a `loadSystemStores` function to handle the loading of system stores with variable replacement for configuration paths.
- Enhanced the `Load` function to include the loading of system stores, improving the overall store management process.
- Updated test utilities to support loading system stores for testing, ensuring comprehensive coverage and functionality.
- Refactored the `replaceVars` function to facilitate variable replacement in JSON strings, enhancing flexibility in store configurations.
2025-07-20 11:23:00 +08:00

20 lines
374 B
Go

package share
// App 应用信息
var App AppInfo
// Public 输出公共信息
func (app AppInfo) Public() AppInfo {
app.Storage.COS = nil
app.Storage.OSS = nil
app.Storage.S3 = nil
return app
}
// GetPrefix Get the prefix of the app with the default value "yao_"
func (app AppInfo) GetPrefix() string {
if app.Prefix == "" {
return "yao_"
}
return app.Prefix
}