fwtransport

package
v0.0.0-...-7000f67 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2023 License: MPL-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileUserAgentString

func CompileUserAgentString(ctx context.Context, name, tfVersion, provVersion string) string

func GenerateFrameworkUserAgentString

func GenerateFrameworkUserAgentString(metaData *fwmodels.ProviderMetaModel, currUserAgent string) string

func GetBatchingConfig

func GetBatchingConfig(ctx context.Context, data types.List, diags *diag.Diagnostics) *transport_tpg.BatchingConfig

GetBatchingConfig returns the batching config object given the provider configuration set for batching

func GetCredentials

func GetCredentials(ctx context.Context, data fwmodels.ProviderModel, initialCredentialsOnly bool, diags *diag.Diagnostics) googleoauth.Credentials

GetCredentials gets credentials with a given scope (clientScopes). If initialCredentialsOnly is true, don't follow the impersonation settings and return the initial set of creds instead.

func GetCurrentUserEmailFramework

func GetCurrentUserEmailFramework(p *FrameworkProviderConfig, userAgent string, diags *diag.Diagnostics) string

func GetTokenSource

func GetTokenSource(ctx context.Context, data fwmodels.ProviderModel, initialCredentialsOnly bool, diags *diag.Diagnostics) oauth2.TokenSource

GetTokenSource gets token source based on the Google Credentials configured. If initialCredentialsOnly is true, don't follow the impersonation settings and return the initial set of creds.

func HandleDatasourceNotFoundError

func HandleDatasourceNotFoundError(ctx context.Context, err error, state *tfsdk.State, resource string, diags *diag.Diagnostics)

func SendFrameworkRequest

func SendFrameworkRequest(p *FrameworkProviderConfig, method, project, rawurl, userAgent string, body map[string]interface{}, errorRetryPredicates ...transport_tpg.RetryErrorPredicateFunc) (map[string]interface{}, diag.Diagnostics)

func SendFrameworkRequestWithTimeout

func SendFrameworkRequestWithTimeout(p *FrameworkProviderConfig, method, project, rawurl, userAgent string, body map[string]interface{}, timeout time.Duration, errorRetryPredicates ...transport_tpg.RetryErrorPredicateFunc) (map[string]interface{}, diag.Diagnostics)

Types

type FrameworkProviderConfig

type FrameworkProviderConfig struct {
	BillingProject types.String
	Client         *http.Client
	Context        context.Context

	PollInterval               time.Duration
	Project                    types.String
	Region                     types.String
	Zone                       types.String
	RequestBatcherIam          *transport_tpg.RequestBatcher
	RequestBatcherServiceUsage *transport_tpg.RequestBatcher
	Scopes                     []string
	TokenSource                oauth2.TokenSource
	UserAgent                  string
	UserProjectOverride        bool

	// paths for client setup
	AccessApprovalBasePath           string
	AccessContextManagerBasePath     string
	ActiveDirectoryBasePath          string
	AlloydbBasePath                  string
	ApiGatewayBasePath               string
	ApigeeBasePath                   string
	AppEngineBasePath                string
	ArtifactRegistryBasePath         string
	BackupDRBasePath                 string
	BeyondcorpBasePath               string
	BiglakeBasePath                  string
	BigQueryBasePath                 string
	BigqueryAnalyticsHubBasePath     string
	BigqueryConnectionBasePath       string
	BigqueryDatapolicyBasePath       string
	BigqueryDataTransferBasePath     string
	BigqueryReservationBasePath      string
	BigtableBasePath                 string
	BillingBasePath                  string
	BinaryAuthorizationBasePath      string
	CertificateManagerBasePath       string
	CloudAssetBasePath               string
	CloudBuildBasePath               string
	Cloudbuildv2BasePath             string
	CloudFunctionsBasePath           string
	Cloudfunctions2BasePath          string
	CloudIdentityBasePath            string
	CloudIdsBasePath                 string
	CloudIotBasePath                 string
	CloudRunBasePath                 string
	CloudRunV2BasePath               string
	CloudSchedulerBasePath           string
	CloudTasksBasePath               string
	ComputeBasePath                  string
	ContainerAnalysisBasePath        string
	ContainerAttachedBasePath        string
	CoreBillingBasePath              string
	DatabaseMigrationServiceBasePath string
	DataCatalogBasePath              string
	DataformBasePath                 string
	DataFusionBasePath               string
	DataLossPreventionBasePath       string
	DataplexBasePath                 string
	DataprocBasePath                 string
	DataprocMetastoreBasePath        string
	DatastoreBasePath                string
	DatastreamBasePath               string
	DeploymentManagerBasePath        string
	DialogflowBasePath               string
	DialogflowCXBasePath             string
	DNSBasePath                      string
	DocumentAIBasePath               string
	DocumentAIWarehouseBasePath      string
	EssentialContactsBasePath        string
	FilestoreBasePath                string
	FirebaseBasePath                 string
	FirebaseDatabaseBasePath         string
	FirebaseExtensionsBasePath       string
	FirebaseHostingBasePath          string
	FirebaseStorageBasePath          string
	FirestoreBasePath                string
	GameServicesBasePath             string
	GKEBackupBasePath                string
	GKEHubBasePath                   string
	GKEHub2BasePath                  string
	GkeonpremBasePath                string
	HealthcareBasePath               string
	IAM2BasePath                     string
	IAMBetaBasePath                  string
	IAMWorkforcePoolBasePath         string
	IapBasePath                      string
	IdentityPlatformBasePath         string
	KMSBasePath                      string
	LoggingBasePath                  string
	LookerBasePath                   string
	MemcacheBasePath                 string
	MLEngineBasePath                 string
	MonitoringBasePath               string
	NetworkConnectivityBasePath      string
	NetworkManagementBasePath        string
	NetworkSecurityBasePath          string
	NetworkServicesBasePath          string
	NotebooksBasePath                string
	OrgPolicyBasePath                string
	OSConfigBasePath                 string
	OSLoginBasePath                  string
	PrivatecaBasePath                string
	PublicCABasePath                 string
	PubsubBasePath                   string
	PubsubLiteBasePath               string
	RedisBasePath                    string
	ResourceManagerBasePath          string
	RuntimeConfigBasePath            string
	SecretManagerBasePath            string
	SecurityCenterBasePath           string
	SecurityScannerBasePath          string
	ServiceDirectoryBasePath         string
	ServiceManagementBasePath        string
	ServiceUsageBasePath             string
	SourceRepoBasePath               string
	SpannerBasePath                  string
	SQLBasePath                      string
	StorageBasePath                  string
	StorageTransferBasePath          string
	TagsBasePath                     string
	TPUBasePath                      string
	VertexAIBasePath                 string
	VmwareengineBasePath             string
	VPCAccessBasePath                string
	WorkflowsBasePath                string
	WorkstationsBasePath             string
	// contains filtered or unexported fields
}

func (*FrameworkProviderConfig) HandleDefaults

func (p *FrameworkProviderConfig) HandleDefaults(ctx context.Context, data *fwmodels.ProviderModel, diags *diag.Diagnostics)

HandleDefaults will handle all the defaults necessary in the provider

func (*FrameworkProviderConfig) LoadAndValidateFramework

func (p *FrameworkProviderConfig) LoadAndValidateFramework(ctx context.Context, data fwmodels.ProviderModel, tfVersion string, diags *diag.Diagnostics, providerversion string)

LoadAndValidateFramework handles the bulk of configuring the provider it is pulled out so that we can manually call this from our testing provider as well

func (*FrameworkProviderConfig) NewDnsClient

func (p *FrameworkProviderConfig) NewDnsClient(userAgent string, diags *diag.Diagnostics) *dns.Service

func (*FrameworkProviderConfig) NewFirebaseClient

func (p *FrameworkProviderConfig) NewFirebaseClient(userAgent string, diags *diag.Diagnostics) *firebase.Service

func (*FrameworkProviderConfig) SetupClient

func (p *FrameworkProviderConfig) SetupClient(ctx context.Context, data fwmodels.ProviderModel, diags *diag.Diagnostics)

func (*FrameworkProviderConfig) SetupGrpcLogging

func (p *FrameworkProviderConfig) SetupGrpcLogging()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL