本文整理汇总了Golang中github.com/googleapis/gax-go.MustCompilePathTemplate函数的典型用法代码示例。如果您正苦于以下问题:Golang MustCompilePathTemplate函数的具体用法?Golang MustCompilePathTemplate怎么用?Golang MustCompilePathTemplate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MustCompilePathTemplate函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
"time"
"cloud.google.com/go/iam"
gax "github.com/googleapis/gax-go"
"golang.org/x/net/context"
"google.golang.org/api/iterator"
"google.golang.org/api/option"
"google.golang.org/api/transport"
pubsubpb "google.golang.org/genproto/googleapis/pubsub/v1"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
)
var (
subscriberProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}")
subscriberSubscriptionPathTemplate = gax.MustCompilePathTemplate("projects/{project}/subscriptions/{subscription}")
subscriberTopicPathTemplate = gax.MustCompilePathTemplate("projects/{project}/topics/{topic}")
)
// SubscriberCallOptions contains the retry settings for each method of SubscriberClient.
type SubscriberCallOptions struct {
CreateSubscription []gax.CallOption
GetSubscription []gax.CallOption
ListSubscriptions []gax.CallOption
DeleteSubscription []gax.CallOption
ModifyAckDeadline []gax.CallOption
Acknowledge []gax.CallOption
Pull []gax.CallOption
StreamingPull []gax.CallOption
ModifyPushConfig []gax.CallOption
示例2: defaultClientOptions
"runtime"
"time"
gax "github.com/googleapis/gax-go"
"golang.org/x/net/context"
"google.golang.org/api/option"
"google.golang.org/api/transport"
monitoredrespb "google.golang.org/genproto/googleapis/api/monitoredres"
loggingpb "google.golang.org/genproto/googleapis/logging/v2"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
)
var (
loggingParentPathTemplate = gax.MustCompilePathTemplate("projects/{project}")
loggingLogPathTemplate = gax.MustCompilePathTemplate("projects/{project}/logs/{log}")
)
// CallOptions contains the retry settings for each method of this client.
type CallOptions struct {
DeleteLog []gax.CallOption
WriteLogEntries []gax.CallOption
ListLogEntries []gax.CallOption
ListMonitoredResourceDescriptors []gax.CallOption
}
func defaultClientOptions() []option.ClientOption {
return []option.ClientOption{
option.WithEndpoint("logging.googleapis.com:443"),
option.WithScopes(
示例3:
"time"
gax "github.com/googleapis/gax-go"
"golang.org/x/net/context"
"google.golang.org/api/iterator"
"google.golang.org/api/option"
"google.golang.org/api/transport"
adminpb "google.golang.org/genproto/googleapis/iam/admin/v1"
iampb "google.golang.org/genproto/googleapis/iam/v1"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
)
var (
iamProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}")
iamServiceAccountPathTemplate = gax.MustCompilePathTemplate("projects/{project}/serviceAccounts/{service_account}")
iamKeyPathTemplate = gax.MustCompilePathTemplate("projects/{project}/serviceAccounts/{service_account}/keys/{key}")
)
// IamCallOptions contains the retry settings for each method of IamClient.
type IamCallOptions struct {
ListServiceAccounts []gax.CallOption
GetServiceAccount []gax.CallOption
CreateServiceAccount []gax.CallOption
UpdateServiceAccount []gax.CallOption
DeleteServiceAccount []gax.CallOption
ListServiceAccountKeys []gax.CallOption
GetServiceAccountKey []gax.CallOption
CreateServiceAccountKey []gax.CallOption
DeleteServiceAccountKey []gax.CallOption
示例4: defaultMetricsClientOptions
"math"
"runtime"
"time"
gax "github.com/googleapis/gax-go"
"golang.org/x/net/context"
"google.golang.org/api/option"
"google.golang.org/api/transport"
loggingpb "google.golang.org/genproto/googleapis/logging/v2"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
)
var (
metricsProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}")
metricsMetricPathTemplate = gax.MustCompilePathTemplate("projects/{project}/metrics/{metric}")
)
// MetricsCallOptions contains the retry settings for each method of this client.
type MetricsCallOptions struct {
ListLogMetrics []gax.CallOption
GetLogMetric []gax.CallOption
CreateLogMetric []gax.CallOption
UpdateLogMetric []gax.CallOption
DeleteLogMetric []gax.CallOption
}
func defaultMetricsClientOptions() []option.ClientOption {
return []option.ClientOption{
option.WithEndpoint("logging.googleapis.com:443"),
示例5: defaultErrorStatsClientOptions
"strings"
"time"
gax "github.com/googleapis/gax-go"
"golang.org/x/net/context"
"google.golang.org/api/iterator"
"google.golang.org/api/option"
"google.golang.org/api/transport"
clouderrorreportingpb "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
)
var (
errorStatsProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}")
)
// ErrorStatsCallOptions contains the retry settings for each method of ErrorStatsClient.
type ErrorStatsCallOptions struct {
ListGroupStats []gax.CallOption
ListEvents []gax.CallOption
DeleteEvents []gax.CallOption
}
func defaultErrorStatsClientOptions() []option.ClientOption {
return []option.ClientOption{
option.WithEndpoint("clouderrorreporting.googleapis.com:443"),
option.WithScopes(
"https://www.googleapis.com/auth/cloud-platform",
),
示例6: defaultReportErrorsClientOptions
import (
"fmt"
"runtime"
"strings"
gax "github.com/googleapis/gax-go"
"golang.org/x/net/context"
"google.golang.org/api/option"
"google.golang.org/api/transport"
clouderrorreportingpb "google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
)
var (
reportErrorsProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}")
)
// ReportErrorsCallOptions contains the retry settings for each method of ReportErrorsClient.
type ReportErrorsCallOptions struct {
ReportErrorEvent []gax.CallOption
}
func defaultReportErrorsClientOptions() []option.ClientOption {
return []option.ClientOption{
option.WithEndpoint("clouderrorreporting.googleapis.com:443"),
option.WithScopes(
"https://www.googleapis.com/auth/cloud-platform",
),
}
}
示例7:
gax "github.com/googleapis/gax-go"
"golang.org/x/net/context"
"google.golang.org/api/iterator"
"google.golang.org/api/option"
"google.golang.org/api/transport"
metricpb "google.golang.org/genproto/googleapis/api/metric"
monitoredrespb "google.golang.org/genproto/googleapis/api/monitoredres"
monitoringpb "google.golang.org/genproto/googleapis/monitoring/v3"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
)
var (
metricProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}")
metricMetricDescriptorPathTemplate = gax.MustCompilePathTemplate("projects/{project}/metricDescriptors/{metric_descriptor=**}")
metricMonitoredResourceDescriptorPathTemplate = gax.MustCompilePathTemplate("projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}")
)
// MetricCallOptions contains the retry settings for each method of MetricClient.
type MetricCallOptions struct {
ListMonitoredResourceDescriptors []gax.CallOption
GetMonitoredResourceDescriptor []gax.CallOption
ListMetricDescriptors []gax.CallOption
GetMetricDescriptor []gax.CallOption
CreateMetricDescriptor []gax.CallOption
DeleteMetricDescriptor []gax.CallOption
ListTimeSeries []gax.CallOption
CreateTimeSeries []gax.CallOption
}
示例8: defaultPublisherClientOptions
"math"
"runtime"
"time"
gax "github.com/googleapis/gax-go"
"golang.org/x/net/context"
"google.golang.org/api/option"
"google.golang.org/api/transport"
pubsubpb "google.golang.org/genproto/googleapis/pubsub/v1"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
)
var (
publisherProjectPathTemplate = gax.MustCompilePathTemplate("projects/{project}")
publisherTopicPathTemplate = gax.MustCompilePathTemplate("projects/{project}/topics/{topic}")
)
// PublisherCallOptions contains the retry settings for each method of this client.
type PublisherCallOptions struct {
CreateTopic []gax.CallOption
Publish []gax.CallOption
GetTopic []gax.CallOption
ListTopics []gax.CallOption
ListTopicSubscriptions []gax.CallOption
DeleteTopic []gax.CallOption
}
func defaultPublisherClientOptions() []option.ClientOption {
return []option.ClientOption{
示例9: defaultConfigClientOptions
"math"
"runtime"
"time"
gax "github.com/googleapis/gax-go"
"golang.org/x/net/context"
"google.golang.org/api/option"
"google.golang.org/api/transport"
loggingpb "google.golang.org/genproto/googleapis/logging/v2"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
)
var (
configParentPathTemplate = gax.MustCompilePathTemplate("projects/{project}")
configSinkPathTemplate = gax.MustCompilePathTemplate("projects/{project}/sinks/{sink}")
)
// ConfigCallOptions contains the retry settings for each method of this client.
type ConfigCallOptions struct {
ListSinks []gax.CallOption
GetSink []gax.CallOption
CreateSink []gax.CallOption
UpdateSink []gax.CallOption
DeleteSink []gax.CallOption
}
func defaultConfigClientOptions() []option.ClientOption {
return []option.ClientOption{
option.WithEndpoint("logging.googleapis.com:443"),