Documentation
¶
Overview ¶
Package render turns codegen IR into formatted Go source.
Index ¶
- func CallsFile(version string, messages []ir.Message) ([]byte, error)
- func ClientFile(version string, messages []ir.Message) ([]byte, error)
- func Enums(f ir.File) ([]byte, error)
- func EnumsFile(pkg string, enums []ir.Enum) ([]byte, error)
- func HandlersFile(version string, messages []ir.Message) ([]byte, error)
- func MessageFile(pkg string, structs []ir.Struct, enums []ir.Enum, needTime, needDecimal bool) ([]byte, error)
- func Messages(f ir.File) ([]byte, error)
- func Profile(f ir.File, profileName string) ([]byte, error)
- func RegisterFile(version string, messages []ir.Message) ([]byte, error)
- func Structs(f ir.File) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallsFile ¶ added in v0.1.5
CallsFile renders typed send helpers for one version: CP<Action> wraps cp.Call for charge-point-sendable messages, CSMS<Action> wraps csms.Call for CSMS-sendable messages. Bidirectional messages (DataTransfer) get both.
func ClientFile ¶ added in v0.1.6
ClientFile renders version-bound wrapper types with typed send methods: CP embeds *cp.Client and exposes a method per CP-sendable action; CSMS embeds *csms.Conn and exposes a method per CSMS-sendable action. Each action gets a synchronous method (wrapping Call) and an <Action>Async method (wrapping CallAsync). Bidirectional messages (DataTransfer) appear on both.
func HandlersFile ¶ added in v0.1.5
HandlersFile renders the typed handler interfaces, Unimplemented defaults, and one-call registrars (RegisterCP / RegisterCSMS) for one version.
func MessageFile ¶
func MessageFile(pkg string, structs []ir.Struct, enums []ir.Enum, needTime, needDecimal bool) ([]byte, error)
MessageFile renders the structs and enums for a single message file.
func RegisterFile ¶
RegisterFile renders a helper that registers all generated schemas.
Types ¶
This section is empty.