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) ([]DataSourceWithRefreshObjectName, error)
}
func NewDataSourceMapper ¶
func NewDataSourceMapper(dataSources map[string]explorer.DataSource, cfg config.Config) DataSourceMapper
type DataSourceWithRefreshObjectName ¶
type DataSourceWithRefreshObjectName struct {
datasource.DataSource
RefreshObjectName string `json:"refresh_object_name"`
ImportStateOverride string `json:"import_state_override"`
Id string `json:"id"`
}
type ProviderMapper ¶
type ProviderMapper interface {
MapToIR(*slog.Logger) (*ProviderWithEndpoint, error)
}
func NewProviderMapper ¶
func NewProviderMapper(exploredProvider explorer.Provider, cfg config.Config) ProviderMapper
type ProviderWithEndpoint ¶ added in v0.5.0
type RequestMapper ¶
type RequestMapper interface {
MapToIR(*slog.Logger) ([]RequestWithName, error)
}
func NewRequestMapper ¶
type RequestTypeWithMethodAndPath ¶
type RequestTypeWithMethodAndPath struct {
spec.RequestType
Method string `json:"method"`
Path string `json:"path"`
}
type RequestWithMethodAndPath ¶
type RequestWithMethodAndPath struct {
Create RequestTypeWithMethodAndPath `json:"create,omitempty"`
Read RequestTypeWithMethodAndPath `json:"read"`
Update []*RequestTypeWithMethodAndPath `json:"update"`
Delete RequestTypeWithMethodAndPath `json:"delete"`
}
type RequestWithName ¶
type RequestWithName struct {
RequestWithMethodAndPath
Name string `json:"name"`
}
type ResourceMapper ¶
type ResourceMapper interface {
MapToIR(*slog.Logger) ([]ResourceWithRefreshObjectName, error)
}
func NewResourceMapper ¶
Source Files
¶
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. |
Click to show internal directories.
Click to hide internal directories.