render

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package render turns codegen IR into formatted Go source.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallsFile added in v0.1.5

func CallsFile(version string, messages []ir.Message) ([]byte, error)

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

func ClientFile(version string, messages []ir.Message) ([]byte, error)

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 Enums

func Enums(f ir.File) ([]byte, error)

Enums renders only enums for one version into Go source.

func EnumsFile

func EnumsFile(pkg string, enums []ir.Enum) ([]byte, error)

EnumsFile renders shared enums into one package file.

func HandlersFile added in v0.1.5

func HandlersFile(version string, messages []ir.Message) ([]byte, error)

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 Messages

func Messages(f ir.File) ([]byte, error)

Messages renders the message structs and enums for one version into Go source.

func Profile

func Profile(f ir.File, profileName string) ([]byte, error)

Profile renders the package-level Message vars for one feature profile.

func RegisterFile

func RegisterFile(version string, messages []ir.Message) ([]byte, error)

RegisterFile renders a helper that registers all generated schemas.

func Structs

func Structs(f ir.File) ([]byte, error)

Structs renders only message structs for one version into Go source.

Types

This section is empty.

Jump to

Keyboard shortcuts

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