...

Source file src/cloud.google.com/go/monitoring/apiv3/path_funcs.go

Documentation: cloud.google.com/go/monitoring/apiv3

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

View as plain text