| 1 |
// Copyright 2018 The Go Cloud Development Kit Authors |
| 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 gcpcloud contains Wire providers for GCP services. |
| 16 |
package gcpcloud // import "gocloud.dev/gcp/gcpcloud" |
| 17 |
|
| 18 |
import ( |
| 19 |
"github.com/google/wire" |
| 20 |
"gocloud.dev/blob/gcsblob" |
| 21 |
"gocloud.dev/docstore/gcpfirestore" |
| 22 |
"gocloud.dev/gcp" |
| 23 |
"gocloud.dev/gcp/cloudsql" |
| 24 |
"gocloud.dev/pubsub/gcppubsub" |
| 25 |
"gocloud.dev/runtimevar/gcpruntimeconfig" |
| 26 |
"gocloud.dev/secrets/gcpkms" |
| 27 |
"gocloud.dev/server/sdserver" |
| 28 |
) |
| 29 |
|
| 30 |
// GCP is a Wire provider set that includes all Google Cloud Platform services |
| 31 |
// in this repository and authenticates using Application Default Credentials. |
| 32 |
var GCP = wire.NewSet(Services, gcp.DefaultIdentity) |
| 33 |
|
| 34 |
// Services is a Wire provider set that includes the default wiring for all |
| 35 |
// Google Cloud Platform services in this repository, but does not include |
| 36 |
// credentials. Individual services may require additional configuration. |
| 37 |
var Services = wire.NewSet( |
| 38 |
gcp.DefaultTransport, |
| 39 |
gcp.NewHTTPClient, |
| 40 |
|
| 41 |
gcpruntimeconfig.Set, |
| 42 |
gcpkms.Set, |
| 43 |
gcppubsub.Set, |
| 44 |
gcsblob.Set, |
| 45 |
cloudsql.CertSourceSet, |
| 46 |
gcpfirestore.Set, |
| 47 |
sdserver.Set, |
| 48 |
) |