validate

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package validate provides configuration validation in two phases.

Phase 1 validates cheburbox.json configs for each server independently (intra-server checks such as hysteria2 server_name collisions).

Phase 2 validates generated sing-box configs across all servers (cross-server checks).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerResult

type ServerResult struct {
	Server   string
	Errors   []error
	Warnings []string
}

ServerResult holds validation results for a single server.

func ValidateAll

func ValidateAll(projectRoot string, jpath string) ([]ServerResult, error)

ValidateAll discovers all servers in the project and runs both validation phases on them.

func ValidateServers

func ValidateServers(projectRoot string, jpath string, serverName string) ([]ServerResult, error)

ValidateServers validates the specified server and its transitive dependencies.

func (*ServerResult) Failed

func (r *ServerResult) Failed() bool

Failed returns true if the server has validation errors.

Jump to

Keyboard shortcuts

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