provider

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 29 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 NewDatabaseDataSource

func NewDatabaseDataSource() datasource.DataSource

NewDatabaseDataSource is a helper function to simplify the provider implementation.

func NewDatabaseResource

func NewDatabaseResource() resource.Resource

NewDatabaseResource is a helper function to simplify the provider implementation.

func NewDatabasesDataSource

func NewDatabasesDataSource() datasource.DataSource

NewDatabasesDataSource is a helper function to simplify the provider implementation.

func NewTokenDataSource

func NewTokenDataSource() datasource.DataSource

NewTokenDataSource is a helper function to simplify the provider implementation.

func NewTokenResource

func NewTokenResource() resource.Resource

NewTokenResource is a helper function to simplify the provider implementation.

func NewTokensDataSource

func NewTokensDataSource() datasource.DataSource

NewTokensDataSource is a helper function to simplify the provider implementation.

Types

type DatabaseDataSource

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

DatabasesDataSource is the data source implementation.

func (*DatabaseDataSource) Configure

Configure adds the provider configured client to the data source.

func (*DatabaseDataSource) Metadata

Metadata returns the data source type name.

func (*DatabaseDataSource) Read

Read refreshes the Terraform state with the latest data.

func (*DatabaseDataSource) Schema

Schema defines the schema for the data source.

type DatabaseModel

type DatabaseModel struct {
	AccountId          types.String                     `tfsdk:"account_id"`
	ClusterId          types.String                     `tfsdk:"cluster_id"`
	Name               types.String                     `tfsdk:"name"`
	MaxTables          types.Int64                      `tfsdk:"max_tables"`
	MaxColumnsPerTable types.Int64                      `tfsdk:"max_columns_per_table"`
	RetentionPeriod    types.Int64                      `tfsdk:"retention_period"`
	PartitionTemplate  []DatabasePartitionTemplateModel `tfsdk:"partition_template"`
}

DatabaseModel maps InfluxDB database schema data.

type DatabasePartitionTemplateModel

type DatabasePartitionTemplateModel struct {
	Type  types.String `json:"type" tfsdk:"type"`
	Value types.String `json:"value" tfsdk:"value"`
}

DatabasePartitionTemplateModel maps InfluxDB database partition template schema data.

func (DatabasePartitionTemplateModel) GetAttrType

func (d DatabasePartitionTemplateModel) GetAttrType() attr.Type

GetAttrType returns the attribute type for the DatabasePartitionTemplateModel.

type DatabaseResource

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

DatabaseResource defines the resource implementation.

func (*DatabaseResource) Configure

Configure adds the provider configured client to the resource.

func (*DatabaseResource) Create

Create creates the resource and sets the initial Terraform state.

func (*DatabaseResource) Delete

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

func (*DatabaseResource) ImportState

func (*DatabaseResource) Metadata

Metadata returns the resource type name.

func (*DatabaseResource) Read

Read refreshes the Terraform state with the latest data.

func (*DatabaseResource) Schema

Schema defines the schema for the resource.

func (*DatabaseResource) Update

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

type DatabasesDataSource

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

DatabasesDataSource is the data source implementation.

func (*DatabasesDataSource) Configure

Configure adds the provider configured client to the data source.

func (*DatabasesDataSource) Metadata

Metadata returns the data source type name.

func (*DatabasesDataSource) Read

Read refreshes the Terraform state with the latest data.

func (*DatabasesDataSource) Schema

Schema defines the schema for the data source.

type DatabasesDataSourceModel

type DatabasesDataSourceModel struct {
	Databases []DatabaseModel `tfsdk:"databases"`
}

DatabasesDataSourceModel describes the data source data model.

type InfluxDBProvider

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

InfluxDBProvider defines the provider implementation.

func (*InfluxDBProvider) Configure

Configure prepares a InfluxDB API client for data sources and resources.

func (*InfluxDBProvider) DataSources

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

DataSources defines the data sources implemented in the provider.

func (*InfluxDBProvider) Metadata

Metadata returns the provider type name.

func (*InfluxDBProvider) Resources

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

Resources defines the resources implemented in the provider.

func (*InfluxDBProvider) Schema

Schema defines the provider-level schema for configuration data.

type InfluxDBProviderModel

type InfluxDBProviderModel struct {
	AccountID types.String `tfsdk:"account_id"`
	ClusterID types.String `tfsdk:"cluster_id"`
	Token     types.String `tfsdk:"token"`
	URL       types.String `tfsdk:"url"`
}

InfluxDBProviderModel maps provider schema data to a Go type.

type TokenDataSource

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

TokensDataSource is the data source implementation.

func (*TokenDataSource) Configure

Configure adds the provider configured client to the data source.

func (*TokenDataSource) Metadata

Metadata returns the data source type name.

func (*TokenDataSource) Read

Read refreshes the Terraform state with the latest data.

func (*TokenDataSource) Schema

Schema defines the schema for the data source.

type TokenModel

type TokenModel struct {
	AccessToken types.String           `tfsdk:"access_token"`
	AccountId   types.String           `tfsdk:"account_id"`
	CreatedAt   types.String           `tfsdk:"created_at"`
	ClusterId   types.String           `tfsdk:"cluster_id"`
	Description types.String           `tfsdk:"description"`
	Id          types.String           `tfsdk:"id"`
	Permissions []TokenPermissionModel `tfsdk:"permissions"`
}

TokenModel maps InfluxDB database token schema data.

type TokenPermissionModel

type TokenPermissionModel struct {
	Action   types.String `tfsdk:"action"`
	Resource types.String `tfsdk:"resource"`
}

TokenPermissionModel maps InfluxDB database token permission schema data.

type TokenResource

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

TokenResource defines the resource implementation.

func (*TokenResource) Configure

Configure adds the provider configured client to the resource.

func (*TokenResource) Create

Create creates the resource and sets the initial Terraform state.

func (*TokenResource) Delete

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

func (*TokenResource) ImportState

func (*TokenResource) Metadata

Metadata returns the resource type name.

func (*TokenResource) Read

Read refreshes the Terraform state with the latest data.

func (*TokenResource) Schema

Schema defines the schema for the resource.

func (*TokenResource) Update

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

type TokensDataSource

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

TokensDataSource is the data source implementation.

func (*TokensDataSource) Configure

Configure adds the provider configured client to the data source.

func (*TokensDataSource) Metadata

Metadata returns the data source type name.

func (*TokensDataSource) Read

Read refreshes the Terraform state with the latest data.

func (*TokensDataSource) Schema

Schema defines the schema for the data source.

type TokensDataSourceModel

type TokensDataSourceModel struct {
	Tokens []TokenModel `tfsdk:"tokens"`
}

TokensDataSourceModel describes the data source data model.

Jump to

Keyboard shortcuts

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