This commit is contained in:
2026-08-15 01:28:51 +08:00
parent 6698e59c3a
commit 2f165d3a45
26 changed files with 242 additions and 216 deletions
+8 -6
View File
@@ -13,9 +13,11 @@ import (
"google.golang.org/protobuf/types/known/durationpb"
)
func (s *SystemService) PersistConfig(ctx context.Context) error { return s.uc.PersistConfig(ctx) }
func (s *SystemConfigService) PersistConfig(ctx context.Context) error {
return s.uc.PersistConfig(ctx)
}
func (s *SystemService) PersistAdminConfig(ctx context.Context, value *conf.AdminBackend) error {
func (s *SystemConfigService) PersistAdminConfig(ctx context.Context, value *conf.AdminBackend) error {
raw, err := protojson.MarshalOptions{UseProtoNames: true}.Marshal(value)
if err != nil {
return err
@@ -23,9 +25,9 @@ func (s *SystemService) PersistAdminConfig(ctx context.Context, value *conf.Admi
return s.uc.PersistAdminConfig(ctx, raw)
}
func (s *SystemService) ReloadConfig(ctx context.Context) error { return s.uc.ReloadConfig(ctx) }
func (s *SystemConfigService) ReloadConfig(ctx context.Context) error { return s.uc.ReloadConfig(ctx) }
func (s *SystemService) DiskMountPoints() []string {
func (s *SystemConfigService) DiskMountPoints() []string {
config := s.runtime.Admin()
if config == nil {
return nil
@@ -39,7 +41,7 @@ func (s *SystemService) DiskMountPoints() []string {
return points
}
func (s *SystemService) SystemConfig() map[string]any {
func (s *SystemConfigService) SystemConfig() map[string]any {
admin := map[string]any{"routerPrefix": ""}
email := map[string]any{}
config := s.runtime.Admin()
@@ -108,7 +110,7 @@ func (s *SystemService) SystemConfig() map[string]any {
return map[string]any{"config": map[string]any{"admin": admin, "email": email, "data": dataMap}}
}
func (s *SystemService) SaveSystemConfig(ctx context.Context, req *dto.SetSystemConfigRequest) error {
func (s *SystemConfigService) SaveSystemConfig(ctx context.Context, req *dto.SetSystemConfigRequest) error {
config := s.runtime.Admin()
if config == nil {
return nil