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