providerbuilder

package
v3.93.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright 2016-2023, Pulumi Corporation.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NewProviderArgs

type NewProviderArgs struct {
	TypeName       string
	Version        string
	ProviderSchema schema.Schema
	AllResources   []Resource

	ConfigureFunc func(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
}

type Provider

type Provider struct {
	TypeName       string
	Version        string
	ProviderSchema schema.Schema
	AllResources   []Resource
	// contains filtered or unexported fields
}

Provider is a test provider that can be used in tests. Instantiate it with NewProvider.

func NewProvider

func NewProvider(params NewProviderArgs) *Provider

NewProvider creates a new provider with the given resources, filling reasonable defaults.

func (*Provider) Configure

func (impl *Provider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)

func (*Provider) DataSources

func (impl *Provider) DataSources(ctx context.Context) []func() datasource.DataSource

func (*Provider) GRPCProvider

func (impl *Provider) GRPCProvider() tfprotov6.ProviderServer

func (*Provider) Metadata

func (impl *Provider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse)

func (*Provider) Resources

func (impl *Provider) Resources(ctx context.Context) []func() resource.Resource

func (*Provider) Schema

func (impl *Provider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)

type Resource

type Resource struct {
	Name           string
	ResourceSchema schema.Schema

	CreateFunc      func(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
	ReadFunc        func(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
	UpdateFunc      func(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
	DeleteFunc      func(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
	ImportStateFunc func(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
}

func (*Resource) Create

func (*Resource) Delete

func (*Resource) ImportState

func (*Resource) Metadata

func (*Resource) Read

func (*Resource) Schema

func (*Resource) Update

Jump to

Keyboard shortcuts

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