provider

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(version string) func() provider.Provider

New is a helper function to simplify provider server and testing implementation.

func NewBlockDataSource

func NewBlockDataSource() datasource.DataSource

NewBlockDataSource is a helper function to simplify the provider implementation.

func NewBlockResource

func NewBlockResource() resource.Resource

NewBlockResource is a helper function to simplify the provider implementation.

func NewBlocksDataSource

func NewBlocksDataSource() datasource.DataSource

NewBlocksDataSource is a helper function to simplify the provider implementation.

func NewPipelineDataSource

func NewPipelineDataSource() datasource.DataSource

NewPipelineDataSource is a helper function to simplify the provider implementation.

func NewPipelineResource

func NewPipelineResource() resource.Resource

NewPipelineResource is a helper function to simplify the provider implementation.

func NewPipelinesDataSource

func NewPipelinesDataSource() datasource.DataSource

NewPipelinesDataSource is a helper function to simplify the provider implementation.

Types

type BlockConfigurationModel

type BlockConfigurationModel struct {
	DataProvider         types.String `tfsdk:"data_provider"`
	DataProviderDatabase types.String `tfsdk:"data_provider_database"`
	DataProviderProfile  types.String `tfsdk:"data_provider_profile"`
	DataProviderSchema   types.String `tfsdk:"data_provider_schema"`
	DataProviderTable    types.String `tfsdk:"data_provider_table"`
	ExportWritePolicy    types.String `tfsdk:"export_write_policy"`
	UseRawSql            types.String `tfsdk:"use_raw_sql"`
}

func (BlockConfigurationModel) GetAttrType

func (b BlockConfigurationModel) GetAttrType() map[string]attr.Type

type BlockDataSource

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

BlockDataSource is the data source implementation.

func (*BlockDataSource) Configure

Configure adds the provider configured client to the data source.

func (*BlockDataSource) Metadata

Metadata returns the data source type name.

func (*BlockDataSource) Read

Read refreshes the Terraform state with the latest data.

func (*BlockDataSource) Schema

Schema defines the schema for the data source.

type BlockDataSourceModel

type BlockDataSourceModel struct {
	PipelineUUID types.String `tfsdk:"pipeline_uuid"`
	BlockModel
}

type BlockModel

type BlockModel struct {
	AllUpstreamBlocksExecuted types.Bool   `tfsdk:"all_upstream_blocks_executed"`
	Configuration             types.Object `tfsdk:"configuration"`
	Content                   types.String `tfsdk:"content"`
	DownstreamBlocks          types.Set    `tfsdk:"downstream_blocks"`
	ExecutorType              types.String `tfsdk:"executor_type"`
	ExtensionUUID             types.String `tfsdk:"extension_uuid"`
	HasCallback               types.Bool   `tfsdk:"has_callback"`
	Language                  types.String `tfsdk:"language"`
	Name                      types.String `tfsdk:"name"`
	Priority                  types.Int32  `tfsdk:"priority"`
	RetryConfig               types.Object `tfsdk:"retry_config"`
	Status                    types.String `tfsdk:"status"`
	Timeout                   types.Int64  `tfsdk:"timeout"`
	Type                      types.String `tfsdk:"type"`
	UpstreamBlocks            types.Set    `tfsdk:"upstream_blocks"`
	UUID                      types.String `tfsdk:"uuid"`
}

func (BlockModel) GetAttrType

func (b BlockModel) GetAttrType() attr.Type

type BlockResource

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

BlockResource defines the resource implementation.

func (*BlockResource) Configure

Configure adds the provider configured client to the resource.

func (*BlockResource) Create

Create creates the resource and sets the initial Terraform state.

func (*BlockResource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*BlockResource) ImportState

func (*BlockResource) Metadata

Metadata returns the resource type name.

func (*BlockResource) Read

Read refreshes the Terraform state with the latest data.

func (*BlockResource) Schema

Schema defines the schema for the resource.

func (*BlockResource) Update

Update updates the resource and sets the updated Terraform state on success.

type BlockResourceModel

type BlockResourceModel struct {
	PipelineUUID types.String `tfsdk:"pipeline_uuid"`
	BlockModel
}

type BlocksDataSource

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

BlocksDataSource is the data source implementation.

func (*BlocksDataSource) Configure

Configure adds the provider configured client to the data source.

func (*BlocksDataSource) Metadata

Metadata returns the data source type name.

func (*BlocksDataSource) Read

Read refreshes the Terraform state with the latest data.

func (*BlocksDataSource) Schema

Schema defines the schema for the data source.

type BlocksDataSourceModel

type BlocksDataSourceModel struct {
	PipelineUUID types.String `tfsdk:"pipeline_uuid"`
	Blocks       []BlockModel `tfsdk:"blocks"`
}

type MageAIProvider

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

MageAIProvider defines the provider implementation.

func (*MageAIProvider) Configure

Configure prepares a Mage AI API client for data sources and resources.

func (*MageAIProvider) DataSources

func (p *MageAIProvider) DataSources(ctx context.Context) []func() datasource.DataSource

DataSources defines the data sources implemented in the provider.

func (*MageAIProvider) Metadata

Metadata returns the provider type name.

func (*MageAIProvider) Resources

func (p *MageAIProvider) Resources(ctx context.Context) []func() resource.Resource

Resources defines the resources implemented in the provider.

func (*MageAIProvider) Schema

Schema defines the provider-level schema for configuration data.

type MageAIProviderModel

type MageAIProviderModel struct {
	ApiKey types.String `tfsdk:"api_key"`
	Host   types.String `tfsdk:"host"`
}

MageAIProviderModel maps provider schema data to a Go type.

type PipelineDataSource

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

PipelineDataSource is the data source implementation.

func (*PipelineDataSource) Configure

Configure adds the provider configured client to the data source.

func (*PipelineDataSource) Metadata

Metadata returns the data source type name.

func (*PipelineDataSource) Read

Read refreshes the Terraform state with the latest data.

func (*PipelineDataSource) Schema

Schema defines the schema for the data source.

type PipelineModel

type PipelineModel struct {
	Blocks                   []BlockModel `tfsdk:"blocks"`
	CacheBlockOutputInMemory types.Bool   `tfsdk:"cache_block_output_in_memory"`
	CreatedAt                types.String `tfsdk:"created_at"`
	Description              types.String `tfsdk:"description"`
	ExecutorCount            types.Int32  `tfsdk:"executor_count"`
	Name                     types.String `tfsdk:"name"`
	RetryConfig              types.Object `tfsdk:"retry_config"`
	RunPipelineInOneProcess  types.Bool   `tfsdk:"run_pipeline_in_one_process"`
	Tags                     types.Set    `tfsdk:"tags"`
	Type                     types.String `tfsdk:"type"`
	UUID                     types.String `tfsdk:"uuid"`
	UpdatedAt                types.String `tfsdk:"updated_at"`
	VariablesDir             types.String `tfsdk:"variables_dir"`
}

type PipelineResource

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

PipelineResource defines the resource implementation.

func (*PipelineResource) Configure

Configure adds the provider configured client to the resource.

func (*PipelineResource) Create

Create creates the resource and sets the initial Terraform state.

func (*PipelineResource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*PipelineResource) ImportState

func (*PipelineResource) Metadata

Metadata returns the resource type name.

func (*PipelineResource) Read

Read refreshes the Terraform state with the latest data.

func (*PipelineResource) Schema

Schema defines the schema for the resource.

func (*PipelineResource) Update

Update updates the resource and sets the updated Terraform state on success.

type PipelinesDataSource

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

PipelinesDataSource is the data source implementation.

func (*PipelinesDataSource) Configure

Configure adds the provider configured client to the data source.

func (*PipelinesDataSource) Metadata

Metadata returns the data source type name.

func (*PipelinesDataSource) Read

Read refreshes the Terraform state with the latest data.

func (*PipelinesDataSource) Schema

Schema defines the schema for the data source.

type PipelinesDataSourceModel

type PipelinesDataSourceModel struct {
	Pipelines []PipelineModel `tfsdk:"pipelines"`
}

PipelinesDataSourceModel describes the data source data model.

type RetryConfigModel

type RetryConfigModel struct {
	Delay              types.Int32 `tfsdk:"delay"`
	ExponentialBackoff types.Bool  `tfsdk:"exponential_backoff"`
	MaxDelay           types.Int32 `tfsdk:"max_delay"`
	Retries            types.Int32 `tfsdk:"retries"`
}

func (RetryConfigModel) GetAttrType

func (r RetryConfigModel) GetAttrType() map[string]attr.Type

Jump to

Keyboard shortcuts

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