Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionBlock ¶ added in v0.1.3
type ConnectionBlock struct {
Driver string `hcl:"driver,label"`
Name string `hcl:"name,label"`
Source string `hcl:"source,attr"`
Pool *PoolBlock `hcl:"pool,block"`
DeclaringDir string `json:"-"`
}
ConnectionBlock defines a database or pool configuration from an HCL connection block.
func (ConnectionBlock) Key ¶ added in v0.1.3
func (c ConnectionBlock) Key() string
Key returns the short identifier for the connection pool.
func (ConnectionBlock) Reference ¶ added in v0.1.3
func (c ConnectionBlock) Reference() string
Reference returns the full manifest expression path for the connection pool.
type ContactBlock ¶ added in v0.1.3
type ContactBlock struct {
Name string `hcl:"name,optional"`
Email string `hcl:"email,optional"`
URL string `hcl:"url,optional"`
}
ContactBlock captures maintainer contact information from an HCL contact block.
type EndpointBlock ¶ added in v0.1.3
type EndpointBlock struct {
MethodAndPath string `hcl:"name,label"`
Description *string `hcl:"description,optional"`
Request *RequestBlock `hcl:"request,block"`
Pipeline *PipelineBlock `hcl:"pipeline,block"`
OpenAPIs []OpenAPIOperationBlock `hcl:"openapi,block"`
DeclaringDir string `json:"-"`
}
EndpointBlock defines an HTTP route declaration from an HCL endpoint block.
type FieldBlock ¶ added in v0.1.3
type FieldBlock struct {
Name string `hcl:"name,label"`
TypeExpr hcl.Expression `hcl:"type,attr"`
Required bool `hcl:"required,optional"`
DefaultExpr hcl.Expression `hcl:"default,optional"`
Description string `hcl:"description,optional"`
EnumExpr hcl.Expression `hcl:"enum,optional"`
Format string `hcl:"format,optional"`
Pattern string `hcl:"pattern,optional"`
MinLength *int `hcl:"min_length,optional"`
MaxLength *int `hcl:"max_length,optional"`
Min *float64 `hcl:"min,optional"`
Max *float64 `hcl:"max,optional"`
MinItems *int `hcl:"min_items,optional"`
MaxItems *int `hcl:"max_items,optional"`
UniqueItems bool `hcl:"unique_items,optional"`
}
FieldBlock defines constraint parameters on a property from an HCL field block.
type FieldGroup ¶ added in v0.1.3
type FieldGroup struct {
Fields []FieldBlock `hcl:"field,block"`
Remain hcl.Body `hcl:",remain"`
}
FieldGroup captures nested inline field blocks within request targets.
type LicenseBlock ¶ added in v0.1.3
LicenseBlock captures API license details from an HCL license block.
type Manifest ¶ added in v0.1.3
type Manifest struct {
Server *ServerBlock
OpenAPI *OpenAPIBlock
Problem *ProblemBlock
Connections []ConnectionBlock
Schemas []SchemaBlock
Endpoints []EndpointBlock
}
Manifest represents the unvalidated abstract syntax tree parsed from HCL files.
type OpenAPIBlock ¶ added in v0.1.3
type OpenAPIBlock struct {
Title string `hcl:"title,optional"`
Version string `hcl:"version,optional"`
Description string `hcl:"description,optional"`
ServersExpr hcl.Expression `hcl:"servers,optional"`
TagsExpr hcl.Expression `hcl:"tags,optional"`
Contact *ContactBlock `hcl:"contact,block"`
License *LicenseBlock `hcl:"license,block"`
}
OpenAPIBlock defines document-level OpenAPI metadata from an HCL openapi block.
type OpenAPIOperationBlock ¶ added in v0.1.3
type OpenAPIOperationBlock struct {
Mode string `hcl:"mode,label"`
Renderer *string `hcl:"renderer,optional"`
Format *string `hcl:"format,optional"`
SpecURL *string `hcl:"spec_url,optional"`
File *string `hcl:"file,optional"`
Inline *string `hcl:"inline,optional"`
Remain hcl.Body `hcl:",remain"`
}
OpenAPIOperationBlock defines documentation handlers inside an endpoint block.
type PipelineBlock ¶ added in v0.1.3
PipelineBlock captures raw pipeline steps while preserving definition order.
type PoolBlock ¶ added in v0.1.3
type PoolBlock struct {
MaxOpen int `hcl:"max_open,optional"`
MaxIdle int `hcl:"max_idle,optional"`
MaxLifetime string `hcl:"max_lifetime,optional"`
IdleTimeout string `hcl:"idle_timeout,optional"`
}
PoolBlock defines connection pool capacity limits from an HCL pool block.
type ProblemBlock ¶ added in v0.1.3
type ProblemBlock struct {
TypePrefix string `hcl:"type_prefix,optional"`
}
ProblemBlock defines RFC 9457 error type configuration from an HCL problem block.
type RequestBlock ¶ added in v0.1.3
type RequestBlock struct {
PathInline *FieldGroup
PathExpr hcl.Expression
QueryInline *FieldGroup
QueryExpr hcl.Expression
HeadersInline *FieldGroup
HeadersExpr hcl.Expression
BodyInline *FieldGroup
BodyExpr hcl.Expression
Remain hcl.Body `hcl:",remain"`
}
RequestBlock captures ingress schemas across path, query, headers, and body.
func (*RequestBlock) Decode ¶ added in v0.1.3
func (r *RequestBlock) Decode(evalCtx *hcl.EvalContext) error
Decode unpacks inline field blocks or schema reference expressions from the request body.
type SchemaBlock ¶ added in v0.1.3
type SchemaBlock struct {
Name string `hcl:"name,label"`
Description string `hcl:"description,optional"`
Fields []FieldBlock `hcl:"field,block"`
}
SchemaBlock defines a named validation structure from an HCL schema block.
type ServerBlock ¶ added in v0.1.3
type ServerBlock struct {
Host string `hcl:"host,optional"`
Port int `hcl:"port,optional"`
ReadTimeout string `hcl:"read_timeout,optional"`
WriteTimeout string `hcl:"write_timeout,optional"`
IdleTimeout string `hcl:"idle_timeout,optional"`
MaxBodySize string `hcl:"max_body_size,optional"`
}
ServerBlock defines raw listener and transport settings from an HCL server block.