mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-28 16:10:25 +08:00
商业版增加UAM功能
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -144,6 +144,12 @@ service ServerService {
|
||||
|
||||
// 获取服务配置
|
||||
rpc composeServerConfig(ComposeServerConfigRequest) returns (ComposeServerConfigResponse);
|
||||
|
||||
// 修改服务UAM设置
|
||||
rpc updateServerUAM(UpdateServerUAMRequest) returns (RPCSuccess);
|
||||
|
||||
// 查找服务UAM设置
|
||||
rpc findEnabledServerUAM(FindEnabledServerUAMRequest) returns (FindEnabledServerUAMResponse);
|
||||
}
|
||||
|
||||
// 创建服务
|
||||
@@ -568,4 +574,19 @@ message ComposeServerConfigRequest {
|
||||
|
||||
message ComposeServerConfigResponse {
|
||||
bytes serverConfigJSON = 1;
|
||||
}
|
||||
|
||||
// 修改服务UAM设置
|
||||
message UpdateServerUAMRequest {
|
||||
int64 serverId = 1;
|
||||
bytes uamJSON = 2;
|
||||
}
|
||||
|
||||
// 查找服务UAM设置
|
||||
message FindEnabledServerUAMRequest {
|
||||
int64 serverId = 1;
|
||||
}
|
||||
|
||||
message FindEnabledServerUAMResponse {
|
||||
bytes uamJSON = 1;
|
||||
}
|
||||
@@ -52,6 +52,9 @@ type ServerConfig struct {
|
||||
// 分组
|
||||
Group *ServerGroupConfig `yaml:"group" json:"group"`
|
||||
|
||||
// UAM
|
||||
UAM *UAMConfig `yaml:"uam" json:"uam"`
|
||||
|
||||
isOk bool
|
||||
|
||||
planId int64
|
||||
@@ -243,6 +246,14 @@ func (this *ServerConfig) Init() (results []error) {
|
||||
}
|
||||
}
|
||||
|
||||
// UAM
|
||||
if this.UAM != nil {
|
||||
err := this.UAM.Init()
|
||||
if err != nil {
|
||||
results = append(results, err)
|
||||
}
|
||||
}
|
||||
|
||||
this.isOk = true
|
||||
|
||||
return nil
|
||||
|
||||
11
pkg/serverconfigs/uam_config.go
Normal file
11
pkg/serverconfigs/uam_config.go
Normal file
@@ -0,0 +1,11 @@
|
||||
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package serverconfigs
|
||||
|
||||
type UAMConfig struct {
|
||||
IsOn bool `yaml:"isOn" json:"isOn"`
|
||||
}
|
||||
|
||||
func (this *UAMConfig) Init() error {
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user