license_model.go 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. package license
  2. // 项目信息
  3. type ProjectInfo struct {
  4. ProjectName string `mapstructure:"project_name"`
  5. UserName string `mapstructure:"user_name"`
  6. UserAddr string `mapstructure:"user_addr"`
  7. SerialNumber string `mapstructure:"serial_number"`
  8. }
  9. // /环境信息
  10. type EnvironmentInfo struct {
  11. CpuSN string `mapstructure:"cpu_sn"`
  12. BaseboardSN string `mapstructure:"baseboard_sn"`
  13. MacAddr string `mapstructure:"mac_addr"`
  14. DiskID string `mapstructure:"disk_id"`
  15. IPAddr string `mapstructure:"ip_addr"`
  16. }
  17. // License信息
  18. type LicenseInfo struct {
  19. GenDate string `mapstructure:"gen_date"`
  20. ExpireDate string `mapstructure:"expire_date"`
  21. LicenseType int `mapstructure:"license_type"`
  22. LicenseVersion int `mapstructure:"license_version"`
  23. HardType int `mapstructure:"hard_type"`
  24. }
  25. // 功能信息
  26. type FeatureInfo struct {
  27. HA bool `mapstructure:"ha"`
  28. Hint bool `mapstructure:"hint"`
  29. FullTextIndex bool `mapstructure:"full_text_index"`
  30. FunctionIndex bool `mapstructure:"function_index"`
  31. BatchMode bool `mapstructure:"batch_mode"`
  32. PlSql bool `mapstructure:"pl_sql"`
  33. AddNode bool `mapstructure:"add_node"`
  34. AutoPartition bool `mapstructure:"auto_partition"`
  35. ResourceQuota bool `mapstructure:"resource_quota"`
  36. NetChannel int `mapstructure:"net_channel"`
  37. DataAutoRebalance bool `mapstructure:"data_auto_rebalance"`
  38. BlackWhiteList bool `mapstructure:"black_white_list"`
  39. Mac bool `mapstructure:"mac"`
  40. ColPrivilege bool `mapstructure:"col_privilege"`
  41. TransmitEncrypt bool `mapstructure:"transmit_encrypt"`
  42. StoreEncrypt bool `mapstructure:"store_encrypt"`
  43. BackupEncrypt bool `mapstructure:"backup_encrypt"`
  44. AuditMode int `mapstructure:"audit_mode"`
  45. GlobalBinlogNode int `mapstructure:"global_binlog_node"`
  46. Dblink bool `mapstructure:"dblink"`
  47. Json bool `mapstructure:"json"`
  48. Spatial bool `mapstructure:"spatial"`
  49. MaxParallel int `mapstructure:"max_parallel"`
  50. StreamLoad bool `mapstructure:"stream_load"`
  51. }
  52. // 服务能力
  53. type ServiceCapacity struct {
  54. InstanceNum int `mapstructure:"instance_num"`
  55. TableRows int `mapstructure:"table_rows"`
  56. ConnectNum int `mapstructure:"connect_num"`
  57. StoreCapacity int `mapstructure:"store_capacity"`
  58. MaxNodeNum int `mapstructure:"max_node_num"`
  59. ListenChannel int `mapstructure:"listen_channel"`
  60. }
  61. type LicenseApplication struct {
  62. ProjectInfo
  63. EnvironmentInfo
  64. LicenseInfo
  65. FeatureInfo
  66. ServiceCapacity
  67. }
  68. type PersonLicense struct {
  69. ProjectInfo
  70. EnvironmentInfo
  71. LicenseInfo
  72. FeatureInfo
  73. ServiceCapacity
  74. }
  75. type StdLicense struct {
  76. ProjectInfo
  77. EnvironmentInfo
  78. LicenseInfo
  79. FeatureInfo
  80. ServiceCapacity
  81. }
  82. type ClusterLicense struct {
  83. ProjectInfo
  84. EnvironmentInfo
  85. LicenseInfo
  86. FeatureInfo
  87. ServiceCapacity
  88. }
  89. type EntLicense struct {
  90. ProjectInfo
  91. EnvironmentInfo
  92. LicenseInfo
  93. FeatureInfo
  94. ServiceCapacity
  95. }
  96. type LiteLicense struct {
  97. ProjectInfo
  98. EnvironmentInfo
  99. LicenseInfo
  100. FeatureInfo
  101. ServiceCapacity
  102. }