mapper

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package mapper includes the types and methods for mapping provider, resource, and data source types (explorer package) from an OpenAPI specification into Provider Code Specification.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataSourceMapper

type DataSourceMapper interface {
	MapToIR(*slog.Logger) ([]DataSourceWithSDK, error)
}

func NewDataSourceMapper

func NewDataSourceMapper(dataSources map[string]explorer.DataSource, cfg config.Config) DataSourceMapper

type DataSourceWithSDK added in v0.3.0

type DataSourceWithSDK struct {
	datasource.DataSource
	SDK string `json:"sdk"`
}

type ProviderMapper

type ProviderMapper interface {
	MapToIR(*slog.Logger) (*provider.Provider, error)
}

func NewProviderMapper

func NewProviderMapper(exploredProvider explorer.Provider, cfg config.Config) ProviderMapper

type RequestMapper

type RequestMapper interface {
	MapToIR(*slog.Logger) ([]spec.Request, error)
}

func NewRequestMapper

func NewRequestMapper(resources map[string]explorer.Resource, cfg config.Config) RequestMapper

type ResourceMapper

type ResourceMapper interface {
	MapToIR(*slog.Logger) ([]ResourceWithSDK, error)
}

func NewResourceMapper

func NewResourceMapper(resources map[string]explorer.Resource, cfg config.Config) ResourceMapper

type ResourceWithSDK added in v0.3.0

type ResourceWithSDK struct {
	resource.Resource
	SDK string `json:"sdk"`
}

Directories

Path Synopsis
Package attrmapper contains types and methods that provide an intermediate step between the OpenAPI schema types (libopenapi) and the Provider Code Specification types (terraform-plugin-codegen-spec).
Package attrmapper contains types and methods that provide an intermediate step between the OpenAPI schema types (libopenapi) and the Provider Code Specification types (terraform-plugin-codegen-spec).
Package frameworkvalidators contains functionality for mapping validations onto specification that uses terraform-plugin-framework-validators.
Package frameworkvalidators contains functionality for mapping validations onto specification that uses terraform-plugin-framework-validators.
Package oas contains the logic that determines how to map OpenAPI schemas to the intermediate attrmapper types.
Package oas contains the logic that determines how to map OpenAPI schemas to the intermediate attrmapper types.

Jump to

Keyboard shortcuts

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