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.4 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 logging
  15. // ConfigProjectPath returns the path for the project resource.
  16. //
  17. // Deprecated: Use
  18. // fmt.Sprintf("projects/%s", project)
  19. // instead.
  20. func ConfigProjectPath(project string) string {
  21. return "" +
  22. "projects/" +
  23. project +
  24. ""
  25. }
  26. // ConfigSinkPath returns the path for the sink resource.
  27. //
  28. // Deprecated: Use
  29. // fmt.Sprintf("projects/%s/sinks/%s", project, sink)
  30. // instead.
  31. func ConfigSinkPath(project, sink string) string {
  32. return "" +
  33. "projects/" +
  34. project +
  35. "/sinks/" +
  36. sink +
  37. ""
  38. }
  39. // ConfigExclusionPath returns the path for the exclusion resource.
  40. //
  41. // Deprecated: Use
  42. // fmt.Sprintf("projects/%s/exclusions/%s", project, exclusion)
  43. // instead.
  44. func ConfigExclusionPath(project, exclusion string) string {
  45. return "" +
  46. "projects/" +
  47. project +
  48. "/exclusions/" +
  49. exclusion +
  50. ""
  51. }
  52. // ProjectPath returns the path for the project resource.
  53. //
  54. // Deprecated: Use
  55. // fmt.Sprintf("projects/%s", project)
  56. // instead.
  57. func ProjectPath(project string) string {
  58. return "" +
  59. "projects/" +
  60. project +
  61. ""
  62. }
  63. // LogPath returns the path for the log resource.
  64. //
  65. // Deprecated: Use
  66. // fmt.Sprintf("projects/%s/logs/%s", project, log)
  67. // instead.
  68. func LogPath(project, log string) string {
  69. return "" +
  70. "projects/" +
  71. project +
  72. "/logs/" +
  73. log +
  74. ""
  75. }
  76. // MetricsProjectPath returns the path for the project resource.
  77. //
  78. // Deprecated: Use
  79. // fmt.Sprintf("projects/%s", project)
  80. // instead.
  81. func MetricsProjectPath(project string) string {
  82. return "" +
  83. "projects/" +
  84. project +
  85. ""
  86. }
  87. // MetricsMetricPath returns the path for the metric resource.
  88. //
  89. // Deprecated: Use
  90. // fmt.Sprintf("projects/%s/metrics/%s", project, metric)
  91. // instead.
  92. func MetricsMetricPath(project, metric string) string {
  93. return "" +
  94. "projects/" +
  95. project +
  96. "/metrics/" +
  97. metric +
  98. ""
  99. }