server

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataSource

type DataSource interface {
	Schema(ctx context.Context) *tfprotov6.Schema
	Validate(ctx context.Context, config map[string]tftypes.Value) (diags []*tfprotov6.Diagnostic, err error)
	Read(ctx context.Context, config map[string]tftypes.Value) (state map[string]tftypes.Value, diags []*tfprotov6.Diagnostic, err error)
}

type Provider

type Provider interface {
	Schema(ctx context.Context) *tfprotov6.Schema
	Validate(ctx context.Context, config map[string]tftypes.Value) (diags []*tfprotov6.Diagnostic, err error)
	Configure(ctx context.Context, config map[string]tftypes.Value) (diags []*tfprotov6.Diagnostic, err error)
}

type Resource

type Resource interface {
	Schema(ctx context.Context) *tfprotov6.Schema
	Validate(ctx context.Context, config map[string]tftypes.Value) (diags []*tfprotov6.Diagnostic, err error)
	Read(ctx context.Context, config map[string]tftypes.Value) (state map[string]tftypes.Value, diags []*tfprotov6.Diagnostic, err error)
	Destroy(ctx context.Context, prior map[string]tftypes.Value) (diags []*tfprotov6.Diagnostic, err error)
	PlanCreate(ctx context.Context, proposed map[string]tftypes.Value, config map[string]tftypes.Value) (planned map[string]tftypes.Value, diags []*tfprotov6.Diagnostic, err error)
	Create(ctx context.Context, planned map[string]tftypes.Value, config map[string]tftypes.Value, prior map[string]tftypes.Value) (state map[string]tftypes.Value, diags []*tfprotov6.Diagnostic, err error)
}

type ResourceUpdater

type ResourceUpdater interface {
	PlanUpdate(ctx context.Context, proposed map[string]tftypes.Value, config map[string]tftypes.Value, prior map[string]tftypes.Value) (planned map[string]tftypes.Value, diags []*tfprotov6.Diagnostic, err error)
	Update(ctx context.Context, planned map[string]tftypes.Value, config map[string]tftypes.Value, prior map[string]tftypes.Value) (state map[string]tftypes.Value, diags []*tfprotov6.Diagnostic, err error)
}

type Server

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

func MustNew

func MustNew(providerFactoryFunc interface{}) *Server

func New

func New(providerFactoryFunc interface{}) (*Server, error)

func (*Server) MustRegisterDataSource

func (s *Server) MustRegisterDataSource(typeName TypeName, factory interface{})

func (*Server) MustRegisterResource

func (s *Server) MustRegisterResource(typeName TypeName, fn interface{})

func (*Server) ReadResource

func (*Server) RegisterDataSource

func (s *Server) RegisterDataSource(typeName TypeName, factory interface{}) error

func (*Server) RegisterResource

func (s *Server) RegisterResource(typeName TypeName, fn interface{}) error

func (*Server) StopProvider

func (*Server) ValidateDataResourceConfig added in v0.5.0

func (*Server) ValidateProviderConfig added in v0.5.0

func (*Server) ValidateResourceConfig added in v0.5.0

type TypeName added in v0.4.0

type TypeName string

TypeName represents the resource / data source type name as passed by Terraform

Jump to

Keyboard shortcuts

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