CaConfig.pas 902 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. unit CaConfig;
  2. interface
  3. uses
  4. BaseConfig, InterfaceConfig;
  5. type
  6. TCaConfig = class(TBaseConfig, ICaConfig)
  7. private
  8. public
  9. constructor Create(); override;
  10. function GetAppID: string;
  11. function GetEnable: Boolean;
  12. function GetURL: string;
  13. function GetCASubject: string; stdcall;
  14. property URL: string read GetURL;
  15. property AppID: string read GetAppID;
  16. property Enable: Boolean read GetEnable;
  17. end;
  18. implementation
  19. { TCaConfig }
  20. constructor TCaConfig.Create;
  21. begin
  22. ConfigType := ctPublic;
  23. FileName := 'ca.json';
  24. inherited;
  25. end;
  26. function TCaConfig.GetAppID: string;
  27. begin
  28. Result := Data.S['appID'];
  29. end;
  30. function TCaConfig.GetCASubject: string;
  31. begin
  32. Result := Data.S['caSubject'];
  33. end;
  34. function TCaConfig.GetEnable: Boolean;
  35. begin
  36. Result := Data.B['enable'];
  37. end;
  38. function TCaConfig.GetURL: string;
  39. begin
  40. Result := Data.S['url'];
  41. end;
  42. end.