You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

108 lines
2.7 KiB

  1. // Copyright 2018 Google LLC
  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. // https://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 monitoring
  15. // GroupProjectPath returns the path for the project resource.
  16. //
  17. // Deprecated: Use
  18. // fmt.Sprintf("projects/%s", project)
  19. // instead.
  20. func GroupProjectPath(project string) string {
  21. return "" +
  22. "projects/" +
  23. project +
  24. ""
  25. }
  26. // GroupGroupPath returns the path for the group resource.
  27. //
  28. // Deprecated: Use
  29. // fmt.Sprintf("projects/%s/groups/%s", project, group)
  30. // instead.
  31. func GroupGroupPath(project, group string) string {
  32. return "" +
  33. "projects/" +
  34. project +
  35. "/groups/" +
  36. group +
  37. ""
  38. }
  39. // MetricProjectPath returns the path for the project resource.
  40. //
  41. // Deprecated: Use
  42. // fmt.Sprintf("projects/%s", project)
  43. // instead.
  44. func MetricProjectPath(project string) string {
  45. return "" +
  46. "projects/" +
  47. project +
  48. ""
  49. }
  50. // MetricMetricDescriptorPath returns the path for the metric descriptor resource.
  51. //
  52. // Deprecated: Use
  53. // fmt.Sprintf("projects/%s/metricDescriptors/%s", project, metricDescriptor)
  54. // instead.
  55. func MetricMetricDescriptorPath(project, metricDescriptor string) string {
  56. return "" +
  57. "projects/" +
  58. project +
  59. "/metricDescriptors/" +
  60. metricDescriptor +
  61. ""
  62. }
  63. // MetricMonitoredResourceDescriptorPath returns the path for the monitored resource descriptor resource.
  64. //
  65. // Deprecated: Use
  66. // fmt.Sprintf("projects/%s/monitoredResourceDescriptors/%s", project, monitoredResourceDescriptor)
  67. // instead.
  68. func MetricMonitoredResourceDescriptorPath(project, monitoredResourceDescriptor string) string {
  69. return "" +
  70. "projects/" +
  71. project +
  72. "/monitoredResourceDescriptors/" +
  73. monitoredResourceDescriptor +
  74. ""
  75. }
  76. // UptimeCheckProjectPath returns the path for the project resource.
  77. //
  78. // Deprecated: Use
  79. // fmt.Sprintf("projects/%s", project)
  80. // instead.
  81. func UptimeCheckProjectPath(project string) string {
  82. return "" +
  83. "projects/" +
  84. project +
  85. ""
  86. }
  87. // UptimeCheckUptimeCheckConfigPath returns the path for the uptime check config resource.
  88. //
  89. // Deprecated: Use
  90. // fmt.Sprintf("projects/%s/uptimeCheckConfigs/%s", project, uptimeCheckConfig)
  91. // instead.
  92. func UptimeCheckUptimeCheckConfigPath(project, uptimeCheckConfig string) string {
  93. return "" +
  94. "projects/" +
  95. project +
  96. "/uptimeCheckConfigs/" +
  97. uptimeCheckConfig +
  98. ""
  99. }