server

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: MIT Imports: 6 Imported by: 0

README

This server was pulled from https://github.com/paultyng/terraform-provider-sql. It was necessary to use this instead of the official SDK because it was impossible to create data source attribute with dynamic schema.

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) *tfprotov5.Schema
	Validate(ctx context.Context, config map[string]tftypes.Value) (diags []*tfprotov5.Diagnostic, err error)
	Read(ctx context.Context, config map[string]tftypes.Value) (state map[string]tftypes.Value, diags []*tfprotov5.Diagnostic, err error)
}

type Provider

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

type Resource

type Resource interface {
	Schema(ctx context.Context) *tfprotov5.Schema
	Validate(ctx context.Context, config map[string]tftypes.Value) (diags []*tfprotov5.Diagnostic, err error)
	Read(ctx context.Context, config map[string]tftypes.Value) (state map[string]tftypes.Value, diags []*tfprotov5.Diagnostic, err error)
	Destroy(ctx context.Context, prior map[string]tftypes.Value) (diags []*tfprotov5.Diagnostic, err error)
	PlanCreate(ctx context.Context, proposed map[string]tftypes.Value, config map[string]tftypes.Value) (planned map[string]tftypes.Value, diags []*tfprotov5.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 []*tfprotov5.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 []*tfprotov5.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 []*tfprotov5.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 string, factory interface{})

func (*Server) MustRegisterResource

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

func (*Server) ReadResource

func (*Server) RegisterDataSource

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

func (*Server) RegisterResource

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

func (*Server) StopProvider

Jump to

Keyboard shortcuts

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