selefra_terraform_schema

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MPL-2.0 Imports: 5 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListResourceParamsFunc added in v0.0.18

type ListResourceParamsFunc func(ctx context.Context, clientMeta *schema.ClientMeta, taskClient any, task *schema.DataSourcePullTask, resultChannel chan<- any) ([]*ResourceRequestParam, *schema.Diagnostics)

ListResourceParamsFunc Returns several parameters that request Resource usage

func (ListResourceParamsFunc) ToSelefraDataSource added in v0.0.18

func (x ListResourceParamsFunc) ToSelefraDataSource(getter TerraformBridgeGetter, resourceName string) schema.DataSource

ToSelefraDataSource Convert the ListFunc to a Selefra DataSource so that you can connect it to the Selefra Provider

type ResourceRequestParam added in v0.0.18

type ResourceRequestParam struct {

	// ID of resource
	ID string

	// The parameters required to request the resource
	ArgumentMap map[string]any
}

ResourceRequestParam Request parameters for the resource

func NewResourceRequestParam added in v0.0.18

func NewResourceRequestParam() *ResourceRequestParam

func NewResourceRequestParamWithArgumentMap added in v0.0.18

func NewResourceRequestParamWithArgumentMap(argumentMap map[string]any) *ResourceRequestParam

func NewResourceRequestParamWithID added in v0.0.18

func NewResourceRequestParamWithID(id string) *ResourceRequestParam

func NewResourceRequestParamWithIDAndArgumentMap added in v0.0.18

func NewResourceRequestParamWithIDAndArgumentMap(id string, argumentMap map[string]any) *ResourceRequestParam

type SelefraTerraformProvider

type SelefraTerraformProvider struct {

	// provider's name
	Name string

	// provider's version
	Version string

	// provider's description, let others know what this provider does in general
	Description string

	// A provider may have many tables. Here are the corresponding tables
	ResourceList []*SelefraTerraformResource

	ConfigMeta provider.ConfigMeta

	EventCallback provider.EventCallback

	ClientMeta schema.ClientMeta

	TransformerMeta schema.TransformerMeta

	ErrorsHandlerMeta schema.ErrorsHandlerMeta
}

SelefraTerraformProvider Indicates that the Provider is coming from the Terraform, which sets the relationship

func (*SelefraTerraformProvider) ToSelefraProvider

func (*SelefraTerraformProvider) ToSelefraTableList

func (x *SelefraTerraformProvider) ToSelefraTableList(getter TerraformBridgeGetter) ([]*schema.Table, *schema.Diagnostics)

type SelefraTerraformResource

type SelefraTerraformResource struct {

	// Table's name
	SelefraTableName string

	// The terraform resource corresponding to this table
	TerraformResourceName string

	// You can provide some description information, which will be included in the automatic document generation
	Description string

	// If your table needs to extend the default call method, you can implement this function
	// The default is to use Task once per client
	// But you can call the client multiple times by making multiple copies of the client
	// When a value is returned, it is called once with each of the returned clients
	// The second parameter, task, if it is not returned, uses the original task. If it is returned, it must be the same length as the client and correspond one to one
	ExpandClientTask func(ctx context.Context, clientMeta *schema.ClientMeta, client any, task *schema.DataSourcePullTask) []*schema.ClientTaskContext

	// A table can have child tables whose data depends on the current table
	//SubTables []*schema.Table
	SubTables []string

	// take resource params
	ListResourceParamsFunc ListResourceParamsFunc
}

SelefraTerraformResource Indicates that the resource is associated with to terraform

func (*SelefraTerraformResource) ToTable

type TerraformBridgeGetter

type TerraformBridgeGetter func(ctx context.Context, clientMeta *schema.ClientMeta, taskClient any, task *schema.DataSourcePullTask) *bridge.TerraformBridge

TerraformBridgeGetter This interface call returns an rpc bridge to the provider created and initialized with the terraform

Jump to

Keyboard shortcuts

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