package user import ( "yunyan/modules" "yunyan/lego/base" "yunyan/lego/core" ) type apiV2Comp struct { modules.MCompHttpGate service base.IRPCXService module *User options *Options } func (this *apiV2Comp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { this.MCompHttpGate.Init(service, module, comp, options) this.service = service.(base.IRPCXService) this.module = module.(*User) this.options = options.(*Options) this.Version = "v2" // 本组件的下发接口均含敏感数据(第三方服务明文凭据/agent 编排),全部声明加密: // 网关对响应体做 AES-CBC(key=gateway 配置 EncryptKey),响应头 X-Encrypted:1。 this.EncryptMsgs = []string{"GetAppConfig", "GetThirdSvcs", "GetAgents"} return } func (this *apiV2Comp) Start() (err error) { err = this.MCompHttpGate.Start() return }