選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

96 行
2.3 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 pubsub
  15. // PublisherProjectPath returns the path for the project resource.
  16. //
  17. // Deprecated: Use
  18. // fmt.Sprintf("projects/%s", project)
  19. // instead.
  20. func PublisherProjectPath(project string) string {
  21. return "" +
  22. "projects/" +
  23. project +
  24. ""
  25. }
  26. // PublisherTopicPath returns the path for the topic resource.
  27. //
  28. // Deprecated: Use
  29. // fmt.Sprintf("projects/%s/topics/%s", project, topic)
  30. // instead.
  31. func PublisherTopicPath(project, topic string) string {
  32. return "" +
  33. "projects/" +
  34. project +
  35. "/topics/" +
  36. topic +
  37. ""
  38. }
  39. // SubscriberProjectPath returns the path for the project resource.
  40. //
  41. // Deprecated: Use
  42. // fmt.Sprintf("projects/%s", project)
  43. // instead.
  44. func SubscriberProjectPath(project string) string {
  45. return "" +
  46. "projects/" +
  47. project +
  48. ""
  49. }
  50. // SubscriberSnapshotPath returns the path for the snapshot resource.
  51. //
  52. // Deprecated: Use
  53. // fmt.Sprintf("projects/%s/snapshots/%s", project, snapshot)
  54. // instead.
  55. func SubscriberSnapshotPath(project, snapshot string) string {
  56. return "" +
  57. "projects/" +
  58. project +
  59. "/snapshots/" +
  60. snapshot +
  61. ""
  62. }
  63. // SubscriberSubscriptionPath returns the path for the subscription resource.
  64. //
  65. // Deprecated: Use
  66. // fmt.Sprintf("projects/%s/subscriptions/%s", project, subscription)
  67. // instead.
  68. func SubscriberSubscriptionPath(project, subscription string) string {
  69. return "" +
  70. "projects/" +
  71. project +
  72. "/subscriptions/" +
  73. subscription +
  74. ""
  75. }
  76. // SubscriberTopicPath returns the path for the topic resource.
  77. //
  78. // Deprecated: Use
  79. // fmt.Sprintf("projects/%s/topics/%s", project, topic)
  80. // instead.
  81. func SubscriberTopicPath(project, topic string) string {
  82. return "" +
  83. "projects/" +
  84. project +
  85. "/topics/" +
  86. topic +
  87. ""
  88. }