Documentation
¶
Overview ¶
Package docsearch is a client for the openfga.dev documentation: the Mintlify MCP search endpoint and the markdown rendering of each docs page.
Index ¶
Constants ¶
const DefaultBaseURL = "https://openfga.dev"
DefaultBaseURL is the docs site the client talks to.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client searches and fetches the OpenFGA docs.
func New ¶
New returns a Client for openfga.dev. A zero timeout disables the deadline, as --timeout 0 promises.
func NewWithBaseURL ¶
NewWithBaseURL returns a Client for a different base URL. It exists so other packages' tests can point a Client at an httptest server; production code uses New.
type Page ¶
type Page struct {
URL string `json:"url" yaml:"url"`
Markdown string `json:"markdown" yaml:"markdown"`
}
Page is a docs page rendered as markdown.
type Result ¶
type Result struct {
Title string `json:"title" yaml:"title"`
URL string `json:"url" yaml:"url"`
MarkdownURL string `json:"markdown_url" yaml:"markdown_url"` // canonical URL + ".md"; empty outside the docs
Page string `json:"page" yaml:"page"`
Snippet string `json:"snippet" yaml:"snippet"`
}
Result is one docs search hit.