provider

package
v0.0.0-...-f66f991 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MPL-2.0 Imports: 16 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 NewUserDataSource

func NewUserDataSource() datasource.DataSource

func NewUserResource

func NewUserResource() resource.Resource

NewUserResource is a helper function to simplify the provider implementation.

Types

type MyInfo

type MyInfo struct {
	ID   types.Int64  `tfsdk:"id" json:"number"`
	Name types.String `tfsdk:"name" json:"name"`
	Age  types.Int64  `tfsdk:"age" json:"age"`
}

type ProviderModel

type ProviderModel struct {
	ApiKey  types.String `tfsdk:"apikey"`
	BaseUrl types.String `tfsdk:"baseurl"`
}

type UserDataSource

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

func (*UserDataSource) Configure

Configure adds the provider configured client to the data source.

func (*UserDataSource) Metadata

func (*UserDataSource) Read

Read refreshes the Terraform state with the latest data.

func (*UserDataSource) Schema

Schema defines the schema for the data source.

type UserInfo

type UserInfo struct {
	Filter map[string]types.String `tfsdk:"filter" json:"filter"`
	ID     types.Int64             `tfsdk:"id" json:"number"`
	Name   types.String            `tfsdk:"name" json:"name"`
	Age    types.Int64             `tfsdk:"age" json:"age"`
	Users  []MyInfo                `tfsdk:"users"`
}

type UserResource

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

UserResource is the resource implementation.

func (*UserResource) Configure

func (*UserResource) Create

Create creates the resource and sets the initial Terraform state.

func (*UserResource) Delete

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

func (*UserResource) Metadata

Metadata returns the resource type name.

func (*UserResource) Read

Read refreshes the Terraform state with the latest data.

func (*UserResource) Schema

Schema defines the schema for the resource.

func (*UserResource) Update

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

Jump to

Keyboard shortcuts

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