...

Source file src/cloud.google.com/go/logging/apiv2/path_funcs.go

Documentation: cloud.google.com/go/logging/apiv2

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

View as plain text