Documentation
¶
Index ¶
- func IsDebug() bool
- type Config
- type Provider
- func (p *Provider) ConfigureProvider(_ context.Context, request *cqproto.ConfigureProviderRequest) (*cqproto.ConfigureProviderResponse, error)
- func (p *Provider) FetchResources(ctx context.Context, request *cqproto.FetchResourcesRequest, ...) error
- func (p *Provider) GetModuleInfo(_ context.Context, request *cqproto.GetModuleRequest) (*cqproto.GetModuleResponse, error)
- func (p *Provider) GetProviderConfig(_ context.Context, req *cqproto.GetProviderConfigRequest) (*cqproto.GetProviderConfigResponse, error)
- func (p *Provider) GetProviderSchema(_ context.Context, _ *cqproto.GetProviderSchemaRequest) (*cqproto.GetProviderSchemaResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config interface {
// Example returns a configuration example (with comments) so user clients can generate an example config
Example() string
}
Config Every provider implements a resources field we only want to extract that in fetch execution
type Provider ¶
type Provider struct {
// Name of plugin i.e aws,gcp, azure etc'
Name string
// Version of the provider
Version string
// Configure the provider and return context
Configure func(hclog.Logger, interface{}) (schema.ClientMeta, diag.Diagnostics)
// ResourceMap is all resources supported by this plugin
ResourceMap map[string]*schema.Table
// Configuration decoded from configure request
Config func() Config
// Logger to call, this logger is passed to the serve.Serve Client, if not define Serve will create one instead.
Logger hclog.Logger
// ErrorClassifier allows the provider to classify errors it produces during table execution, and return them as diagnostics to the user.
// Classifier function may return empty slice if it cannot meaningfully convert the error into diagnostics. In this case
// the error will be converted by the SDK into diagnostic at ERROR level and RESOLVING type.
ErrorClassifier execution.ErrorClassifier
// ModuleInfoReader is called when the user executes a module, to get provider supported metadata about the given module
ModuleInfoReader module.InfoReader
// contains filtered or unexported fields
}
Provider is the base structure required to pass and serve an sdk provider.Provider
func (*Provider) ConfigureProvider ¶ added in v0.2.0
func (p *Provider) ConfigureProvider(_ context.Context, request *cqproto.ConfigureProviderRequest) (*cqproto.ConfigureProviderResponse, error)
func (*Provider) FetchResources ¶ added in v0.2.0
func (p *Provider) FetchResources(ctx context.Context, request *cqproto.FetchResourcesRequest, sender cqproto.FetchResourcesSender) error
func (*Provider) GetModuleInfo ¶ added in v0.8.1
func (p *Provider) GetModuleInfo(_ context.Context, request *cqproto.GetModuleRequest) (*cqproto.GetModuleResponse, error)
func (*Provider) GetProviderConfig ¶ added in v0.2.0
func (p *Provider) GetProviderConfig(_ context.Context, req *cqproto.GetProviderConfigRequest) (*cqproto.GetProviderConfigResponse, error)
func (*Provider) GetProviderSchema ¶ added in v0.2.0
func (p *Provider) GetProviderSchema(_ context.Context, _ *cqproto.GetProviderSchemaRequest) (*cqproto.GetProviderSchemaResponse, error)
Click to show internal directories.
Click to hide internal directories.