Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDataSource ¶
func NewDataSource[T any](d DataSource[T]) func() datasource.DataSourceWithConfigure
Types ¶
type ConfigureRequest ¶
type ConfigureRequest struct {
Conn sql.Connection
}
type DataSource ¶
type DataSource[TData any] interface { GetName() string GetSchema(ctx context.Context) tfsdk.Schema Read(ctx context.Context, req ReadRequest[TData], resp *ReadResponse[TData]) }
type DataSourceWithValidation ¶ added in v0.4.0
type DataSourceWithValidation[TData any] interface { Validate(ctx context.Context, req ValidateRequest[TData], resp *ValidateResponse[TData]) }
type MonadRequest ¶ added in v0.4.0
type MonadRequest struct {
// contains filtered or unexported fields
}
func (MonadRequest) Then ¶ added in v0.4.0
func (r MonadRequest) Then(f func()) utils.ErrorMonad
type ReadRequest ¶
type ReadRequest[TData any] struct { MonadRequest Conn sql.Connection Config TData }
type ReadResponse ¶
type ReadResponse[TData any] struct { // contains filtered or unexported fields }
func (*ReadResponse[TData]) SetState ¶
func (r *ReadResponse[TData]) SetState(state TData)
type StateSetter ¶
type StateSetter[TData any] func(state TData)
type ValidateRequest ¶ added in v0.4.0
type ValidateRequest[TData any] struct { MonadRequest Config TData }
type ValidateResponse ¶ added in v0.4.0
type ValidateResponse[TData any] struct{}
Click to show internal directories.
Click to hide internal directories.