loader

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Overview

Package loader reads codegen inputs: JSON schemas and profile YAML.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadSchema

func LoadSchema(path string) (map[string]any, error)

LoadSchema reads a JSON Schema file into a generic map.

Types

type Profile

type Profile struct {
	Messages []ProfileMessage `yaml:"messages"`
}

Profile is one OCPP feature profile (Core, FirmwareManagement, ...).

type ProfileMessage

type ProfileMessage struct {
	Name     string `yaml:"name"`
	Request  string `yaml:"request"`
	Response string `yaml:"response"`
	Dir      string `yaml:"dir"`
}

ProfileMessage maps one action to its schema files and direction.

type ProfileSet

type ProfileSet struct {
	Version  string             `yaml:"version"`
	Profiles map[string]Profile `yaml:"profiles"`
}

ProfileSet is the full v*.yaml document.

func LoadProfile

func LoadProfile(path string) (ProfileSet, error)

LoadProfile reads and parses a profile YAML file.

Jump to

Keyboard shortcuts

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