Crate hemmer_provider_generator_common

Crate hemmer_provider_generator_common 

Source
Expand description

Common types and utilities for the Hemmer Provider Generator

This crate contains shared data structures, error types, and utilities used across the parser, generator, and CLI components.

§Architecture

The generator follows this data flow:

  1. Parser: SDK crates → ServiceDefinition (intermediate representation)
  2. Generator: ServiceDefinition → Generated code (provider.k + Rust)
  3. Output: Generated provider implementing ProviderExecutor trait

Modules§

sdk_metadata
SDK metadata loading from YAML files

Structs§

BlockDefinition
Definition of a nested block type within a resource
ConfigCodegen
Configuration code generation patterns for a provider
DataSourceDefinition
Definition of a data source (read-only resource lookup)
FieldDefinition
Definition of a field in a resource
OperationMapping
Mapping of a CRUD operation to SDK operation(s)
Operations
CRUD operations mapped from SDK operations
ParserRegistry
Registry for managing SDK parsers
ProviderConfigAttr
A provider-specific configuration attribute with code generation metadata
ProviderDefinition
Intermediate representation of a unified cloud provider with multiple services
ProviderSdkConfig
Provider-specific SDK configuration for code generation
ResourceDefinition
Definition of a single resource type (e.g., S3 Bucket, EC2 Instance)
SdkMetadata
Metadata about an SDK
ServiceDefinition
Intermediate representation of a cloud service (e.g., aws-sdk-s3)

Enums§

FieldType
Represents a field type in the intermediate representation
GeneratorError
Errors that can occur during provider generation
NestingMode
Nesting mode for block types
Provider
Represents a cloud provider type

Traits§

SdkParser
Trait for parsing SDK crates into ServiceDefinition IR

Functions§

sanitize_identifier_part
Sanitize a string to be a valid Rust identifier part (for composite names)
sanitize_rust_identifier
Sanitize a string to be a valid Rust identifier

Type Aliases§

Result
Result type for generator operations