Documentation
¶
Overview ¶
Package proadocs is the official Go client for Proa's public documentation API.
Search and read Rust framework documentation at https://proa.so/docs/api. No credentials are required. This client does not build or deploy applications.
Index ¶
- Constants
- type APIError
- type Client
- func (c *Client) Get(ctx context.Context, path string) (*Document, error)
- func (c *Client) List(ctx context.Context, options PageOptions) (*DocumentList, error)
- func (c *Client) Search(ctx context.Context, query string, options PageOptions) (*DocumentList, error)
- func (c *Client) WalkDocuments(ctx context.Context, visit func(DocumentSummary) error) error
- type Document
- type DocumentList
- type DocumentSummary
- type Options
- type PageOptions
- type Problem
Constants ¶
const DefaultBaseURL = "https://proa.so"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
APIError preserves the HTTP status, optional problem document, and retry delay. The client never retries automatically. Use errors.As to inspect this error.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is safe for concurrent use when its supplied HTTPClient is too.
func (*Client) List ¶
func (c *Client) List(ctx context.Context, options PageOptions) (*DocumentList, error)
func (*Client) Search ¶
func (c *Client) Search(ctx context.Context, query string, options PageOptions) (*DocumentList, error)
func (*Client) WalkDocuments ¶
WalkDocuments visits every public document, following pagination with batches of 50. Return an error from visit or cancel ctx to stop. Repeated or empty continuation cursors are rejected rather than looping indefinitely.
type Document ¶
type Document struct {
DocumentSummary
Markdown string `json:"markdown"`
}
type DocumentList ¶
type DocumentList struct {
Results []DocumentSummary `json:"results"`
Total int `json:"total"`
NextCursor *string `json:"next_cursor"`
}
type DocumentSummary ¶
type Options ¶
Options configures a client. Zero values select production, a 15-second per-request timeout, and the default HTTP transport. A base URL can include a path prefix, for example https://example.com/docs-service.
type PageOptions ¶
PageOptions controls pagination. Limit zero uses the server default (10). Reuse a returned NextCursor only with the same query and deployment.