Documentation
¶
Overview ¶
Package samples provides search functionality over community-contributed Microsoft Graph API query samples.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteIndex ¶
WriteIndex serializes an Index to JSON and writes it to the given path.
Types ¶
type Index ¶
type Index struct {
Generated string `json:"generated"`
Count int `json:"count"`
Samples []Sample `json:"samples"`
}
Index holds the full searchable samples index.
func BuildIndex ¶
BuildIndex walks a samples directory, parses all YAML files, and returns a compiled Index. This is used by CI to produce samples-index.json.
type Sample ¶
type Sample struct {
Intent string `json:"intent" yaml:"intent"`
Query interface{} `json:"query" yaml:"query"` // string or []string for multi-step
Product string `json:"product" yaml:"-"` // populated from directory name
File string `json:"file" yaml:"-"` // relative path within samples/
}
Sample represents a single community-contributed query sample.
func (*Sample) QueryStrings ¶
QueryStrings returns the query as a string slice, normalizing both single-string and multi-step list formats.
type SearchResult ¶
SearchResult wraps a sample with a relevance indicator.
Click to show internal directories.
Click to hide internal directories.