registry

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: GPL-3.0 Imports: 7 Imported by: ? 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProtocolRegistry

type ProtocolRegistry struct {
	// contains filtered or unexported fields
}

ProtocolRegistry manages loaded protocol schemas.

func NewProtocolRegistry

func NewProtocolRegistry(cr *checksum.ChecksumRegistry, fr *format.FormatRegistry) *ProtocolRegistry

NewProtocolRegistry creates a new ProtocolRegistry with the given registries for semantic validation during PSL parsing.

func (*ProtocolRegistry) GetSchema

func (r *ProtocolRegistry) GetSchema(name string) (*schema.ProtocolSchema, error)

GetSchema returns the schema for the given protocol name.

func (*ProtocolRegistry) Has

func (r *ProtocolRegistry) Has(name string) bool

Has checks whether a protocol is registered.

func (*ProtocolRegistry) List

func (r *ProtocolRegistry) List() []string

List returns all registered protocol names in sorted order.

func (*ProtocolRegistry) RegisterFromFile

func (r *ProtocolRegistry) RegisterFromFile(filePath string) error

RegisterFromFile reads a PSL file and registers the protocol.

func (*ProtocolRegistry) RegisterFromPSL

func (r *ProtocolRegistry) RegisterFromPSL(pslText string) error

RegisterFromPSL parses PSL text and registers the resulting schema.

func (*ProtocolRegistry) RegisterFromPSLReturnName

func (r *ProtocolRegistry) RegisterFromPSLReturnName(pslText string) (string, error)

RegisterFromPSLReturnName parses PSL text, registers the schema, and returns the protocol name.

Jump to

Keyboard shortcuts

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