gen21

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gen21 writes the Go types of package v21 from the OCA's OCPP 2.1 JSON schemas, which the ocpp module embeds unmodified. Only the structure is taken (property names, types, required properties, enumeration values); descriptions are not copied.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(files map[string][]byte, send map[string]bool) ([]byte, error)

Generate returns the source of package v21 from the 2.1 schema files (by file name without .json). send names the SEND actions, whose single schema has no Request suffix.

func Instance

func Instance(schema []byte, full bool) (any, error)

Instance builds a payload valid against schema, for tests: with full false only the required properties, with full true every property (and one unnamed property in each object the schema leaves open).

Types

This section is empty.

Jump to

Keyboard shortcuts

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