proto

package
v3.97.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Overview

proto enables building a shim.Provider around a tfprotov6.ProviderServer.

It is intended to help with schema generation, and should not be used for "runtime" resource operations like Provider.Apply, Provider.Diff, etc.

To view unsupported methods, see ./unsuported.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Empty

func Empty() shim.Provider

Create a shim.Provider that wraps an empty tfprotov6.ProviderServer.

It is safe to use for schema operations (returning empty results). It has the same runtime restrictions as New.

func New

New projects a new tfprotov6.ProviderServer into a schema only shim.Provider.

Non-schema runtime methods will panic.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider provides a shim from tfprotov6.ProviderServer to shim.Provider.

To create a Provider, use New. A zero value Provider will panic on most operations.

As much as possible, Provider is designed to be a wrapper type. It is cheap to create and use because it doesn't call any methods on the underlying server until it needs to.

Provider is part of an internal API and does not have any compatibility guarantees. It may be changed or removed in future updates.

func (Provider) Apply

func (Provider) Config

func (p Provider) Config(context.Context) (tftypes.Object, error)

func (Provider) Configure

func (Provider) Configure(ctx context.Context, c shim.ResourceConfig) error

func (Provider) DataSources

func (p Provider) DataSources(context.Context) (runtypes.DataSources, error)

func (Provider) DataSourcesMap

func (p Provider) DataSourcesMap() shim.ResourceMap

func (Provider) Diff

func (Provider) InitLogging

func (Provider) InitLogging(ctx context.Context)

func (Provider) InternalValidate

func (Provider) InternalValidate() error

func (Provider) IsSet

func (Provider) IsSet(ctx context.Context, v interface{}) ([]interface{}, bool)

Checks if a value is representing a Set, and unpacks its elements on success.

func (Provider) Meta

func (Provider) Meta(ctx context.Context) interface{}

func (Provider) NewDestroyDiff

func (Provider) NewDestroyDiff(ctx context.Context, t string, opts shim.TimeoutOptions) shim.InstanceDiff

Create a Destroy diff for a resource identified by the TF token t.

func (Provider) NewProviderConfig

func (Provider) NewProviderConfig(ctx context.Context, object map[string]interface{}) shim.ResourceConfig

func (Provider) NewResourceConfig

func (Provider) NewResourceConfig(ctx context.Context, object map[string]interface{}) shim.ResourceConfig

func (Provider) ReadDataApply

func (Provider) ReadDataApply(ctx context.Context, t string, d shim.InstanceDiff) (shim.InstanceState, error)

func (Provider) ReadDataDiff

func (Provider) Refresh

func (Provider) Resources

func (p Provider) Resources(context.Context) (runtypes.Resources, error)

func (Provider) ResourcesMap

func (p Provider) ResourcesMap() shim.ResourceMap

func (Provider) Schema

func (p Provider) Schema() shim.SchemaMap

func (Provider) Server

Get access to the underlying sever used in Provide

func (Provider) Stop

func (Provider) Stop(ctx context.Context) error

func (Provider) SupportsUnknownCollections

func (Provider) SupportsUnknownCollections() bool

func (Provider) Validate

func (Provider) Validate(ctx context.Context, c shim.ResourceConfig) ([]string, []error)

func (Provider) ValidateDataSource

func (Provider) ValidateDataSource(ctx context.Context, t string, c shim.ResourceConfig) ([]string, []error)

func (Provider) ValidateResource

func (Provider) ValidateResource(ctx context.Context, t string, c shim.ResourceConfig) ([]string, []error)

Jump to

Keyboard shortcuts

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