Skip to main content

Module services

Module services 

Source
Expand description

Library-level service entrypoints built on the core ports. Small embeddable LDAP service surface with optional DSL pipeline support.

This module is intentionally narrow. It currently understands only ldap user [uid] and ldap netgroup [name], plus any trailing DSL stages. Passing any other command root to crate::services::execute_line returns an error immediately.

Use this when you want in-process LDAP lookups plus DSL filtering without bootstrapping the full CLI host or REPL runtime.

High level flow:

  • parse a small LDAP command grammar
  • execute it against abstract crate::ports traits
  • optionally apply trailing DSL stages to the returned rows

Contract:

  • this layer is intentionally small and port-driven
  • richer host concerns like plugin dispatch, prompt handling, and terminal rendering belong elsewhere

Public API shape:

  • crate::services::ServiceContext::new is the main construction surface
  • parsed commands and output values stay plain semantic data
  • callers that outgrow this surface should move up to crate::app rather than rebuilding host machinery here

Structs§

ServiceContext
Embeddable execution inputs for the small service-layer command API.

Enums§

ParsedCommand
Parsed subset of commands understood by execute_line.

Functions§

execute_command
Executes a parsed service-layer command against the configured LDAP port.
execute_line
Executes one LDAP service command line and applies any trailing DSL stages.
parse_repl_command
Interprets tokenized service-layer input using the minimal LDAP command grammar.