Documentation
¶
Index ¶
- func AddGcpMetadata(ctx context.Context, c schema.ClientMeta, r *schema.Resource) error
- func Configure(logger hclog.Logger, config interface{}) (schema.ClientMeta, error)
- func DeleteProjectFilter(meta schema.ClientMeta, _ *schema.Resource) []interface{}
- func ErrorClassifier(meta schema.ClientMeta, resourceName string, err error) diag.Diagnostics
- func GcpMockTestHelper(t *testing.T, table *schema.Table, createService func() (*Services, error), ...)
- func GcpTestHelper(t *testing.T, table *schema.Table)
- func ISODateResolver(path string) schema.ColumnResolver
- func IgnoreErrorHandler(err error) bool
- func ProjectMultiplex(meta schema.ClientMeta) []schema.ClientMeta
- func RedactError(projects []string, e diag.Diagnostic) diag.Diagnostic
- func ResolveProject(_ context.Context, meta schema.ClientMeta, r *schema.Resource, _ schema.Column) error
- func ResolveResourceId(_ context.Context, _ schema.ClientMeta, r *schema.Resource, c schema.Column) error
- type Client
- func (c Client) Logger() hclog.Logger
- func (c Client) Retry(ctx context.Context, bo gax.Backoff, f func() (stop bool, err error)) error
- func (c Client) RetryWithDefaultBackoff(ctx context.Context, f func() (stop bool, err error)) error
- func (c Client) RetryWithDefaultBackoffIgnoreErrors(ctx context.Context, f func() (stop bool, err error), ignoreCodes map[int]bool) error
- type Config
- type Services
- type TestOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddGcpMetadata ¶
func DeleteProjectFilter ¶
func DeleteProjectFilter(meta schema.ClientMeta, _ *schema.Resource) []interface{}
func ErrorClassifier ¶ added in v0.5.0
func ErrorClassifier(meta schema.ClientMeta, resourceName string, err error) diag.Diagnostics
func GcpMockTestHelper ¶ added in v0.5.1
func ISODateResolver ¶ added in v0.3.4
func ISODateResolver(path string) schema.ColumnResolver
func IgnoreErrorHandler ¶
func ProjectMultiplex ¶
func ProjectMultiplex(meta schema.ClientMeta) []schema.ClientMeta
func RedactError ¶ added in v0.6.1
func RedactError(projects []string, e diag.Diagnostic) diag.Diagnostic
RedactError redacts a given diagnostic and returns a RedactedDiagnostic containing both original and redacted versions
func ResolveProject ¶
Types ¶
type Client ¶
type Client struct {
// All gcp services initialized by client
Services *Services
// this is set by table client multiplexer
ProjectId string
// contains filtered or unexported fields
}
func NewGcpClient ¶
func (Client) RetryWithDefaultBackoff ¶ added in v0.2.3
type Config ¶
type Config struct {
ProjectFilter string `hcl:"project_filter,optional"`
ProjectIDs []string `hcl:"project_ids,optional"`
ServiceAccountKeyJSON string `hcl:"service_account_key_json,optional"`
}
Config defines Provider Configuration
type Services ¶
type Services struct {
Kms *kms.Service
Storage *storage.Service
Sql *sql.Service
Iam *iam.Service
CloudFunctions *cloudfunctions.Service
Domain *domains.Service
Compute *compute.Service
BigQuery *bigquery.Service
Dns *dns.Service
Logging *logging.Service
Monitoring *monitoring.Service
ResourceManager *cloudresourcemanager.Service
}
type TestOptions ¶ added in v0.5.1
type TestOptions struct {
SkipEmptyJsonB bool
}
Click to show internal directories.
Click to hide internal directories.