Documentation
¶
Overview ¶
Package graphify provides a small, testable process adapter for the Graphify CLI. It deliberately never invokes a shell: every argument is passed directly to os/exec so URLs, paths, and user-supplied metadata cannot be interpreted as shell syntax.
Index ¶
- type AddOptions
- type AddResult
- type Client
- func (c *Client) Add(ctx context.Context, opts AddOptions) (AddResult, error)
- func (c *Client) Extract(ctx context.Context, opts ExtractOptions) (GraphStats, Result, error)
- func (c *Client) ExtractCommand(opts ExtractOptions) (Command, string, error)
- func (c *Client) Preflight(ctx context.Context) (string, error)
- type Command
- type ExtractOptions
- type GraphStats
- type OSRunner
- type Result
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client invokes one Graphify binary through a Runner.
func (*Client) Extract ¶
func (c *Client) Extract(ctx context.Context, opts ExtractOptions) (GraphStats, Result, error)
Extract runs Graphify and validates the resulting graph.
func (*Client) ExtractCommand ¶
func (c *Client) ExtractCommand(opts ExtractOptions) (Command, string, error)
ExtractCommand builds a direct, shell-free extraction command. It never adds --allow-partial; preserving the last complete graph is the safe default.
type Command ¶
type Command struct {
Name string
Args []string
Dir string
Env []string
// Timeout is an optional whole-process deadline. A caller context with an
// earlier deadline still wins.
Timeout time.Duration
}
Command is one direct process invocation.
type ExtractOptions ¶
type ExtractOptions = ingest.ExtractOptions
ExtractOptions controls a headless Graphify extraction.
type GraphStats ¶
type GraphStats = ingest.GraphStats
GraphStats is the minimal machine-readable health view of graph.json.
func Validate ¶
func Validate(path string) (GraphStats, error)
Validate ensures graph.json exists, is valid JSON, and contains node and edge arrays. Both "edges" and NetworkX's "links" representation are accepted.