25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

50 satır
1.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 spanner
  15. // DatabasePath returns the path for the database resource.
  16. //
  17. // Deprecated: Use
  18. // fmt.Sprintf("projects/%s/instances/%s/databases/%s", project, instance, database)
  19. // instead.
  20. func DatabasePath(project, instance, database string) string {
  21. return "" +
  22. "projects/" +
  23. project +
  24. "/instances/" +
  25. instance +
  26. "/databases/" +
  27. database +
  28. ""
  29. }
  30. // SessionPath returns the path for the session resource.
  31. //
  32. // Deprecated: Use
  33. // fmt.Sprintf("projects/%s/instances/%s/databases/%s/sessions/%s", project, instance, database, session)
  34. // instead.
  35. func SessionPath(project, instance, database, session string) string {
  36. return "" +
  37. "projects/" +
  38. project +
  39. "/instances/" +
  40. instance +
  41. "/databases/" +
  42. database +
  43. "/sessions/" +
  44. session +
  45. ""
  46. }