Documentation
¶
Index ¶
- type ProtocolRegistry
- func (r *ProtocolRegistry) GetSchema(name string) (*schema.ProtocolSchema, error)
- func (r *ProtocolRegistry) Has(name string) bool
- func (r *ProtocolRegistry) List() []string
- func (r *ProtocolRegistry) RegisterFromFile(filePath string) error
- func (r *ProtocolRegistry) RegisterFromPSL(pslText string) error
- func (r *ProtocolRegistry) RegisterFromPSLReturnName(pslText string) (string, error)
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.
Click to show internal directories.
Click to hide internal directories.