dtsrc

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CanConfigValidators

type CanConfigValidators interface {
	ConfigValidators(context.Context) []datasource.ConfigValidator
}

CanConfigValidators optional interface to inject config validators method on datasource block.

type CanConfigure

type CanConfigure interface {
	Configure(context.Context, datasource.ConfigureRequest, *datasource.ConfigureResponse)
}

CanConfigure optional interface to inject configure method on datasource block.

type CanMetadata

type CanMetadata interface {
	Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
}

CanMetadata optional interface to inject metadata method on datasource block.

type CanSchema

type CanSchema interface {
	Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
}

CanSchema optional interface to inject schema method on datasource block.

type CanValidateConfig

type CanValidateConfig interface {
	ValidateConfig(context.Context, datasource.ValidateConfigRequest, *datasource.ValidateConfigResponse)
}

CanValidateConfig optional interface to inject validate config method on datasource block.

type Datasource

type Datasource[T any] interface {
	// Read receive a context, a ReadRequest, a ReadResponse and a data object filled with the data from the datasource.
	// It should return the same or update data object updated or diag.Diagnostics if error occurs during the read.
	Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse, data T) (T, diag.Diagnostics)
}

Datasource required methods on datasource block.

T is the protobuf message generated by protoc-gen-go.

Jump to

Keyboard shortcuts

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