app.go 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package compute
  15. import (
  16. "time"
  17. "yunion.io/x/onecloud/pkg/apis"
  18. )
  19. const (
  20. APP_TYPE_WEB = "web"
  21. APP_STATUS_READY = "ready"
  22. APP_STATUS_UNKNOWN = "unknown"
  23. )
  24. type AppListInput struct {
  25. apis.VirtualResourceListInput
  26. apis.ExternalizedResourceBaseListInput
  27. apis.EnabledResourceBaseListInput
  28. ManagedResourceListInput
  29. RegionalFilterListInput
  30. TechStack string `json:"tech_stack"`
  31. }
  32. type AppDetails struct {
  33. apis.VirtualResourceDetails
  34. ManagedResourceInfo
  35. CloudregionResourceInfo
  36. Network string `json:"network"`
  37. VpcId string `json:"vpc_id"`
  38. Vpc string `json:"vpc"`
  39. }
  40. type AppEnvironmentListInput struct {
  41. apis.VirtualResourceListInput
  42. apis.ExternalizedResourceBaseListInput
  43. AppId string `json:"app_id"`
  44. InstanceType string `json:"instance_type"`
  45. }
  46. type AppEnvironmentDetails struct {
  47. apis.VirtualResourceDetails
  48. }
  49. type AppHybirdConnection struct {
  50. Id string `json:"id"`
  51. Name string `json:"name"`
  52. Hostname string `json:"hostname"`
  53. Namespace string `json:"namespace"`
  54. Port int `json:"port"`
  55. }
  56. type AppHybirdConnectionOutput struct {
  57. Data []AppHybirdConnection `json:"data"`
  58. }
  59. type AppBackup struct {
  60. Id string `json:"id"`
  61. Name string `json:"name"`
  62. Type string `json:"type"`
  63. }
  64. type AppBackupOutput struct {
  65. Data []AppBackup `json:"data"`
  66. BackupConfig struct {
  67. Enabled bool `json:"enabled"`
  68. FrequencyInterval int `json:"frequency_interval"`
  69. FrequencyUnit string `json:"frequency_unit"`
  70. RetentionPeriodInDays int `json:"retention_period_in_days"`
  71. } `json:"backup_config"`
  72. }
  73. type AppCertificate struct {
  74. Id string `json:"id"`
  75. Name string `json:"name"`
  76. SubjectName string `json:"subject_name"`
  77. Issuer string `json:"issuer"`
  78. IssueDate time.Time `json:"issue_date"`
  79. Thumbprint string `json:"thumbprint"`
  80. ExpireTime time.Time `json:"expire_time"`
  81. }
  82. type AppCertificateOutput struct {
  83. Data []AppCertificate `json:"data"`
  84. }
  85. type AppDomain struct {
  86. Id string `json:"id"`
  87. Name string `json:"name"`
  88. Status string `json:"status"`
  89. SslState string `json:"ssl_state"`
  90. }
  91. type AppDomainOutput struct {
  92. Data []AppDomain `json:"data"`
  93. }