schema

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package schema provides JSON Schema definitions for routeros-cli structured output types. AI agents can use these schemas to understand the shape of JSON responses returned by each command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List() []string

List returns all registered schema names in sorted order.

Types

type Schema

type Schema struct {
	Type        string            `json:"type"`
	Description string            `json:"description,omitempty"`
	Properties  map[string]Schema `json:"properties,omitempty"`
	Items       *Schema           `json:"items,omitempty"`
	Required    []string          `json:"required,omitempty"`
}

Schema is a simplified JSON Schema representation. It intentionally omits features like $ref, oneOf, or format to keep the definitions portable and easy for AI agents to consume.

func DHCPLeaseSchema

func DHCPLeaseSchema() Schema

DHCPLeaseSchema returns the schema for "dhcp lease" items.

func DHCPPoolSchema

func DHCPPoolSchema() Schema

DHCPPoolSchema returns the schema for "dhcp pool" items.

func DHCPServerSchema

func DHCPServerSchema() Schema

DHCPServerSchema returns the schema for "dhcp server" items.

func DNSSettingsSchema

func DNSSettingsSchema() Schema

DNSSettingsSchema returns the schema for "dns" items.

func EnvelopeSchema

func EnvelopeSchema() Schema

EnvelopeSchema returns the successful response envelope: {ok, data, meta}.

func ErrorSchema

func ErrorSchema() Schema

ErrorSchema returns the error response envelope: {ok, error}.

func FirewallRuleSchema

func FirewallRuleSchema() Schema

FirewallRuleSchema returns the schema for "firewall filter" items.

func Get

func Get(name string) (Schema, bool)

Get looks up a schema by command name. It returns the schema and true if found, or a zero Schema and false if the name is not registered.

func IPAddressSchema

func IPAddressSchema() Schema

IPAddressSchema returns the schema for "ip address" items.

func IPRouteSchema

func IPRouteSchema() Schema

IPRouteSchema returns the schema for "ip route" items.

func InterfaceSchema

func InterfaceSchema() Schema

InterfaceSchema returns the schema for "interface" items.

func SystemIdentitySchema

func SystemIdentitySchema() Schema

SystemIdentitySchema returns the schema for "system identity" items.

func SystemInfoSchema

func SystemInfoSchema() Schema

SystemInfoSchema returns the schema for "system info" items.

func SystemResourceSchema

func SystemResourceSchema() Schema

SystemResourceSchema returns the schema for "system resource" items.

Jump to

Keyboard shortcuts

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