Documentation
¶
Index ¶
- type GDriveProvider
- func (g *GDriveProvider) ExecuteQuery(ctx context.Context, pctx *sources.ProviderContext, spec sources.QuerySpec) (*sources.QueryResponse, error)
- func (g *GDriveProvider) FormatFilename(format string, metadata map[string]string) string
- func (g *GDriveProvider) Name() string
- func (g *GDriveProvider) Read(ctx context.Context, pctx *sources.ProviderContext, path string, ...) ([]byte, error)
- func (g *GDriveProvider) ReadDir(ctx context.Context, pctx *sources.ProviderContext, path string) ([]sources.DirEntry, error)
- func (g *GDriveProvider) ReadResult(ctx context.Context, pctx *sources.ProviderContext, resultID string) ([]byte, error)
- func (g *GDriveProvider) Readlink(ctx context.Context, pctx *sources.ProviderContext, path string) (string, error)
- func (g *GDriveProvider) Search(ctx context.Context, pctx *sources.ProviderContext, query string, limit int) ([]sources.SearchResult, error)
- func (g *GDriveProvider) Stat(ctx context.Context, pctx *sources.ProviderContext, path string) (*sources.FileInfo, error)
- type GitHubProvider
- func (g *GitHubProvider) DefaultResourceType() string
- func (g *GitHubProvider) ExecuteQuery(ctx context.Context, pctx *sources.ProviderContext, spec sources.QuerySpec) (*sources.QueryResponse, error)
- func (g *GitHubProvider) FormatFilename(format string, metadata map[string]string) string
- func (g *GitHubProvider) ListResources(ctx context.Context, pctx *sources.ProviderContext, resourceType string) ([]sources.Resource, error)
- func (g *GitHubProvider) Name() string
- func (g *GitHubProvider) Read(ctx context.Context, pctx *sources.ProviderContext, path string, ...) ([]byte, error)
- func (g *GitHubProvider) ReadDir(ctx context.Context, pctx *sources.ProviderContext, path string) ([]sources.DirEntry, error)
- func (g *GitHubProvider) ReadResult(ctx context.Context, pctx *sources.ProviderContext, resultID string) ([]byte, error)
- func (g *GitHubProvider) Readlink(ctx context.Context, pctx *sources.ProviderContext, path string) (string, error)
- func (g *GitHubProvider) Search(ctx context.Context, pctx *sources.ProviderContext, query string, limit int) ([]sources.SearchResult, error)
- func (g *GitHubProvider) Stat(ctx context.Context, pctx *sources.ProviderContext, path string) (*sources.FileInfo, error)
- type GmailProvider
- func (g *GmailProvider) ExecuteQuery(ctx context.Context, pctx *sources.ProviderContext, spec sources.QuerySpec) (*sources.QueryResponse, error)
- func (g *GmailProvider) FormatFilename(format string, metadata map[string]string) string
- func (g *GmailProvider) Name() string
- func (g *GmailProvider) Read(ctx context.Context, pctx *sources.ProviderContext, path string, ...) ([]byte, error)
- func (g *GmailProvider) ReadDir(ctx context.Context, pctx *sources.ProviderContext, path string) ([]sources.DirEntry, error)
- func (g *GmailProvider) ReadResult(ctx context.Context, pctx *sources.ProviderContext, resultID string) ([]byte, error)
- func (g *GmailProvider) Readlink(ctx context.Context, pctx *sources.ProviderContext, path string) (string, error)
- func (g *GmailProvider) Search(ctx context.Context, pctx *sources.ProviderContext, query string, limit int) ([]sources.SearchResult, error)
- func (g *GmailProvider) Stat(ctx context.Context, pctx *sources.ProviderContext, path string) (*sources.FileInfo, error)
- type LinearProvider
- func (l *LinearProvider) DefaultResourceType() string
- func (l *LinearProvider) ExecuteQuery(ctx context.Context, pctx *sources.ProviderContext, spec sources.QuerySpec) (*sources.QueryResponse, error)
- func (l *LinearProvider) FormatFilename(format string, metadata map[string]string) string
- func (l *LinearProvider) ListResources(ctx context.Context, pctx *sources.ProviderContext, resourceType string) ([]sources.Resource, error)
- func (l *LinearProvider) Name() string
- func (l *LinearProvider) Read(ctx context.Context, pctx *sources.ProviderContext, path string, ...) ([]byte, error)
- func (l *LinearProvider) ReadDir(ctx context.Context, pctx *sources.ProviderContext, path string) ([]sources.DirEntry, error)
- func (l *LinearProvider) ReadResult(ctx context.Context, pctx *sources.ProviderContext, resultID string) ([]byte, error)
- func (l *LinearProvider) Readlink(ctx context.Context, pctx *sources.ProviderContext, path string) (string, error)
- func (l *LinearProvider) Search(ctx context.Context, pctx *sources.ProviderContext, query string, limit int) ([]sources.SearchResult, error)
- func (l *LinearProvider) Stat(ctx context.Context, pctx *sources.ProviderContext, path string) (*sources.FileInfo, error)
- type NotionProvider
- func (n *NotionProvider) ExecuteQuery(ctx context.Context, pctx *sources.ProviderContext, spec sources.QuerySpec) (*sources.QueryResponse, error)
- func (n *NotionProvider) FormatFilename(format string, metadata map[string]string) string
- func (n *NotionProvider) Name() string
- func (n *NotionProvider) Read(ctx context.Context, pctx *sources.ProviderContext, path string, ...) ([]byte, error)
- func (n *NotionProvider) ReadDir(ctx context.Context, pctx *sources.ProviderContext, path string) ([]sources.DirEntry, error)
- func (n *NotionProvider) ReadResult(ctx context.Context, pctx *sources.ProviderContext, resultID string) ([]byte, error)
- func (n *NotionProvider) Readlink(ctx context.Context, pctx *sources.ProviderContext, path string) (string, error)
- func (n *NotionProvider) Search(ctx context.Context, pctx *sources.ProviderContext, query string, limit int) ([]sources.SearchResult, error)
- func (n *NotionProvider) Stat(ctx context.Context, pctx *sources.ProviderContext, path string) (*sources.FileInfo, error)
- type PostHogProvider
- func (p *PostHogProvider) ExecuteQuery(ctx context.Context, pctx *sources.ProviderContext, spec sources.QuerySpec) (*sources.QueryResponse, error)
- func (p *PostHogProvider) FormatFilename(format string, metadata map[string]string) string
- func (p *PostHogProvider) IsNativeBrowsable() bool
- func (p *PostHogProvider) Name() string
- func (p *PostHogProvider) Read(ctx context.Context, pctx *sources.ProviderContext, path string, ...) ([]byte, error)
- func (p *PostHogProvider) ReadDir(ctx context.Context, pctx *sources.ProviderContext, path string) ([]sources.DirEntry, error)
- func (p *PostHogProvider) ReadResult(ctx context.Context, pctx *sources.ProviderContext, resultID string) ([]byte, error)
- func (p *PostHogProvider) Readlink(_ context.Context, _ *sources.ProviderContext, _ string) (string, error)
- func (p *PostHogProvider) Search(_ context.Context, _ *sources.ProviderContext, _ string, _ int) ([]sources.SearchResult, error)
- func (p *PostHogProvider) Stat(ctx context.Context, pctx *sources.ProviderContext, path string) (*sources.FileInfo, error)
- func (p *PostHogProvider) ValidateCredentials(ctx context.Context, creds *types.IntegrationCredentials) error
- type SlackProvider
- func (s *SlackProvider) DefaultResourceType() string
- func (s *SlackProvider) ExecuteQuery(ctx context.Context, pctx *sources.ProviderContext, spec sources.QuerySpec) (*sources.QueryResponse, error)
- func (s *SlackProvider) FormatFilename(format string, metadata map[string]string) string
- func (s *SlackProvider) ListResources(ctx context.Context, pctx *sources.ProviderContext, resourceType string) ([]sources.Resource, error)
- func (s *SlackProvider) Name() string
- func (s *SlackProvider) Read(ctx context.Context, pctx *sources.ProviderContext, path string, ...) ([]byte, error)
- func (s *SlackProvider) ReadDir(ctx context.Context, pctx *sources.ProviderContext, path string) ([]sources.DirEntry, error)
- func (s *SlackProvider) ReadResult(ctx context.Context, pctx *sources.ProviderContext, resultID string) ([]byte, error)
- func (s *SlackProvider) Readlink(ctx context.Context, pctx *sources.ProviderContext, path string) (string, error)
- func (s *SlackProvider) Search(ctx context.Context, pctx *sources.ProviderContext, query string, limit int) ([]sources.SearchResult, error)
- func (s *SlackProvider) Stat(ctx context.Context, pctx *sources.ProviderContext, path string) (*sources.FileInfo, error)
- type WebProvider
- func (w *WebProvider) ExecuteQuery(ctx context.Context, _ *sources.ProviderContext, spec sources.QuerySpec) (*sources.QueryResponse, error)
- func (w *WebProvider) FormatFilename(format string, meta map[string]string) string
- func (w *WebProvider) Name() string
- func (w *WebProvider) Read(_ context.Context, _ *sources.ProviderContext, _ string, _, _ int64) ([]byte, error)
- func (w *WebProvider) ReadDir(_ context.Context, _ *sources.ProviderContext, _ string) ([]sources.DirEntry, error)
- func (w *WebProvider) ReadResult(ctx context.Context, _ *sources.ProviderContext, resultID string) ([]byte, error)
- func (w *WebProvider) Readlink(_ context.Context, _ *sources.ProviderContext, _ string) (string, error)
- func (w *WebProvider) Search(_ context.Context, _ *sources.ProviderContext, _ string, _ int) ([]sources.SearchResult, error)
- func (w *WebProvider) Stat(_ context.Context, _ *sources.ProviderContext, path string) (*sources.FileInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GDriveProvider ¶
type GDriveProvider struct {
// contains filtered or unexported fields
}
GDriveProvider implements sources.Provider for Google Drive integration. It exposes Google Drive resources as a read-only filesystem under /sources/gdrive/
func NewGDriveProvider ¶
func NewGDriveProvider() *GDriveProvider
NewGDriveProvider creates a new Google Drive source provider
func (*GDriveProvider) ExecuteQuery ¶
func (g *GDriveProvider) ExecuteQuery(ctx context.Context, pctx *sources.ProviderContext, spec sources.QuerySpec) (*sources.QueryResponse, error)
ExecuteQuery runs a Google Drive search query and returns results with generated filenames. This implements the sources.QueryExecutor interface for filesystem queries. Supports pagination via spec.PageToken for fetching subsequent pages.
func (*GDriveProvider) FormatFilename ¶
func (g *GDriveProvider) FormatFilename(format string, metadata map[string]string) string
FormatFilename generates a filename from metadata using a format template. Supported placeholders: {id}, {name}, {date}, {created}, {mime_type}, {ext} - {name} is the basename (no extension) - {ext} is the extension (includes leading dot, e.g. ".pdf") This implements the sources.QueryExecutor interface.
func (*GDriveProvider) Name ¶
func (g *GDriveProvider) Name() string
func (*GDriveProvider) Read ¶
func (g *GDriveProvider) Read(ctx context.Context, pctx *sources.ProviderContext, path string, offset, length int64) ([]byte, error)
Read reads file content
func (*GDriveProvider) ReadDir ¶
func (g *GDriveProvider) ReadDir(ctx context.Context, pctx *sources.ProviderContext, path string) ([]sources.DirEntry, error)
ReadDir lists directory contents
func (*GDriveProvider) ReadResult ¶
func (g *GDriveProvider) ReadResult(ctx context.Context, pctx *sources.ProviderContext, resultID string) ([]byte, error)
ReadResult fetches the content of a Drive file by its file ID. This implements the sources.QueryExecutor interface.
func (*GDriveProvider) Readlink ¶
func (g *GDriveProvider) Readlink(ctx context.Context, pctx *sources.ProviderContext, path string) (string, error)
Readlink is not supported for Drive
func (*GDriveProvider) Search ¶
func (g *GDriveProvider) Search(ctx context.Context, pctx *sources.ProviderContext, query string, limit int) ([]sources.SearchResult, error)
Search executes a Google Drive search query and returns results The query uses Google Drive query syntax (e.g., "name contains 'invoice'", "mimeType='application/pdf'")
type GitHubProvider ¶
type GitHubProvider struct {
// contains filtered or unexported fields
}
GitHubProvider implements sources.Provider for GitHub integration. It exposes GitHub resources as a read-only filesystem under /sources/github/
func NewGitHubProvider ¶
func NewGitHubProvider() *GitHubProvider
NewGitHubProvider creates a new GitHub source provider
func (*GitHubProvider) DefaultResourceType ¶ added in v0.1.50
func (g *GitHubProvider) DefaultResourceType() string
DefaultResourceType implements sources.ResourceLister.
func (*GitHubProvider) ExecuteQuery ¶
func (g *GitHubProvider) ExecuteQuery(ctx context.Context, pctx *sources.ProviderContext, spec sources.QuerySpec) (*sources.QueryResponse, error)
ExecuteQuery runs a GitHub search query and returns results with generated filenames. This implements the sources.QueryExecutor interface for filesystem queries. Supports pagination via spec.PageToken for fetching subsequent pages.
func (*GitHubProvider) FormatFilename ¶
func (g *GitHubProvider) FormatFilename(format string, metadata map[string]string) string
FormatFilename generates a filename from metadata using the format template.
func (*GitHubProvider) ListResources ¶ added in v0.1.50
func (g *GitHubProvider) ListResources(ctx context.Context, pctx *sources.ProviderContext, resourceType string) ([]sources.Resource, error)
ListResources implements sources.ResourceLister.
func (*GitHubProvider) Name ¶
func (g *GitHubProvider) Name() string
func (*GitHubProvider) Read ¶
func (g *GitHubProvider) Read(ctx context.Context, pctx *sources.ProviderContext, path string, offset, length int64) ([]byte, error)
Read reads file content
func (*GitHubProvider) ReadDir ¶
func (g *GitHubProvider) ReadDir(ctx context.Context, pctx *sources.ProviderContext, path string) ([]sources.DirEntry, error)
ReadDir lists directory contents
func (*GitHubProvider) ReadResult ¶
func (g *GitHubProvider) ReadResult(ctx context.Context, pctx *sources.ProviderContext, resultID string) ([]byte, error)
ReadResult fetches the content by ID. ID formats:
- "repo:owner/repo" - repository
- "pr:owner/repo#number:content_type" - pull request
- "issue:owner/repo#number:content_type" - issue
- "commit:owner/repo@sha:content_type" - commit
- "release:owner/repo@tag:content_type" - release
- "workflow:owner/repo#id:content_type" - workflow run
- "file:owner/repo@ref:path:content_type" - file
- "branch:owner/repo@name" - branch
func (*GitHubProvider) Readlink ¶
func (g *GitHubProvider) Readlink(ctx context.Context, pctx *sources.ProviderContext, path string) (string, error)
Readlink is not supported for GitHub
func (*GitHubProvider) Search ¶
func (g *GitHubProvider) Search(ctx context.Context, pctx *sources.ProviderContext, query string, limit int) ([]sources.SearchResult, error)
Search is not supported for GitHub (use the repository browser instead)
type GmailProvider ¶
type GmailProvider struct {
// contains filtered or unexported fields
}
GmailProvider implements sources.Provider for Gmail integration. Structure: /sources/gmail/messages/{category}/{sender}/{subject}/
func NewGmailProvider ¶
func NewGmailProvider() *GmailProvider
NewGmailProvider creates a new Gmail source provider
func (*GmailProvider) ExecuteQuery ¶
func (g *GmailProvider) ExecuteQuery(ctx context.Context, pctx *sources.ProviderContext, spec sources.QuerySpec) (*sources.QueryResponse, error)
ExecuteQuery runs a Gmail search query and returns results with generated filenames. This implements the sources.QueryExecutor interface for filesystem queries. Supports pagination via spec.PageToken for fetching subsequent pages.
func (*GmailProvider) FormatFilename ¶
func (g *GmailProvider) FormatFilename(format string, metadata map[string]string) string
FormatFilename generates a filename from metadata using a format template. Supported placeholders: {id}, {date}, {from}, {to}, {subject}, {snippet} This implements the sources.QueryExecutor interface.
func (*GmailProvider) Name ¶
func (g *GmailProvider) Name() string
func (*GmailProvider) Read ¶
func (g *GmailProvider) Read(ctx context.Context, pctx *sources.ProviderContext, path string, offset, length int64) ([]byte, error)
Read reads file content
func (*GmailProvider) ReadDir ¶
func (g *GmailProvider) ReadDir(ctx context.Context, pctx *sources.ProviderContext, path string) ([]sources.DirEntry, error)
ReadDir lists directory contents
func (*GmailProvider) ReadResult ¶
func (g *GmailProvider) ReadResult(ctx context.Context, pctx *sources.ProviderContext, resultID string) ([]byte, error)
ReadResult fetches the content of an email by its message ID. This implements the sources.QueryExecutor interface.
func (*GmailProvider) Readlink ¶
func (g *GmailProvider) Readlink(ctx context.Context, pctx *sources.ProviderContext, path string) (string, error)
Readlink is not supported for Gmail
func (*GmailProvider) Search ¶
func (g *GmailProvider) Search(ctx context.Context, pctx *sources.ProviderContext, query string, limit int) ([]sources.SearchResult, error)
Search executes a Gmail search query and returns results The query is passed directly to Gmail's search API (e.g., "is:unread", "from:john newer_than:7d")
type LinearProvider ¶ added in v0.1.9
type LinearProvider struct {
// contains filtered or unexported fields
}
LinearProvider implements sources.Provider for Linear integration. Primary usage is via smart queries: mkdir /sources/linear/my-assigned-issues
func NewLinearProvider ¶ added in v0.1.9
func NewLinearProvider() *LinearProvider
func (*LinearProvider) DefaultResourceType ¶ added in v0.1.54
func (l *LinearProvider) DefaultResourceType() string
func (*LinearProvider) ExecuteQuery ¶ added in v0.1.9
func (l *LinearProvider) ExecuteQuery(ctx context.Context, pctx *sources.ProviderContext, spec sources.QuerySpec) (*sources.QueryResponse, error)
func (*LinearProvider) FormatFilename ¶ added in v0.1.9
func (l *LinearProvider) FormatFilename(format string, metadata map[string]string) string
func (*LinearProvider) ListResources ¶ added in v0.1.54
func (l *LinearProvider) ListResources(ctx context.Context, pctx *sources.ProviderContext, resourceType string) ([]sources.Resource, error)
func (*LinearProvider) Name ¶ added in v0.1.9
func (l *LinearProvider) Name() string
func (*LinearProvider) Read ¶ added in v0.1.9
func (l *LinearProvider) Read(ctx context.Context, pctx *sources.ProviderContext, path string, offset, length int64) ([]byte, error)
func (*LinearProvider) ReadDir ¶ added in v0.1.9
func (l *LinearProvider) ReadDir(ctx context.Context, pctx *sources.ProviderContext, path string) ([]sources.DirEntry, error)
func (*LinearProvider) ReadResult ¶ added in v0.1.9
func (l *LinearProvider) ReadResult(ctx context.Context, pctx *sources.ProviderContext, resultID string) ([]byte, error)
func (*LinearProvider) Readlink ¶ added in v0.1.9
func (l *LinearProvider) Readlink(ctx context.Context, pctx *sources.ProviderContext, path string) (string, error)
func (*LinearProvider) Search ¶ added in v0.1.9
func (l *LinearProvider) Search(ctx context.Context, pctx *sources.ProviderContext, query string, limit int) ([]sources.SearchResult, error)
type NotionProvider ¶
type NotionProvider struct {
// contains filtered or unexported fields
}
NotionProvider implements sources.Provider for Notion integration. It exposes Notion resources as a read-only filesystem under /sources/notion/
func NewNotionProvider ¶
func NewNotionProvider() *NotionProvider
NewNotionProvider creates a new Notion source provider
func (*NotionProvider) ExecuteQuery ¶
func (n *NotionProvider) ExecuteQuery(ctx context.Context, pctx *sources.ProviderContext, spec sources.QuerySpec) (*sources.QueryResponse, error)
ExecuteQuery runs a Notion search query and returns results with generated filenames. This implements the sources.QueryExecutor interface for filesystem queries. Supports pagination via spec.PageToken (Notion's start_cursor) for fetching subsequent pages.
func (*NotionProvider) FormatFilename ¶
func (n *NotionProvider) FormatFilename(format string, metadata map[string]string) string
FormatFilename generates a filename from metadata using a format template. Supported placeholders: {id}, {title}, {type}, {date}, {created} This implements the sources.QueryExecutor interface.
func (*NotionProvider) Name ¶
func (n *NotionProvider) Name() string
func (*NotionProvider) Read ¶
func (n *NotionProvider) Read(ctx context.Context, pctx *sources.ProviderContext, path string, offset, length int64) ([]byte, error)
Read reads file content
func (*NotionProvider) ReadDir ¶
func (n *NotionProvider) ReadDir(ctx context.Context, pctx *sources.ProviderContext, path string) ([]sources.DirEntry, error)
ReadDir lists directory contents
func (*NotionProvider) ReadResult ¶
func (n *NotionProvider) ReadResult(ctx context.Context, pctx *sources.ProviderContext, resultID string) ([]byte, error)
ReadResult fetches the content of a Notion page by its page ID. Returns the page content as markdown. This implements the sources.QueryExecutor interface.
func (*NotionProvider) Readlink ¶
func (n *NotionProvider) Readlink(ctx context.Context, pctx *sources.ProviderContext, path string) (string, error)
Readlink is not supported for Notion
func (*NotionProvider) Search ¶
func (n *NotionProvider) Search(ctx context.Context, pctx *sources.ProviderContext, query string, limit int) ([]sources.SearchResult, error)
Search executes a Notion search query and returns results The query is a plain text search term
type PostHogProvider ¶ added in v0.1.32
type PostHogProvider struct{}
PostHogProvider implements sources.Provider, sources.NativeBrowsable, and sources.CredentialValidator for PostHog integration. It exposes PostHog resources as a read-only filesystem under /sources/posthog/.
Filesystem layout:
/sources/posthog/
{project-id}_{project-name}/
events/
{event-id}.json
feature-flags/
{flag-key}.json
insights/
{insight-short-id}_{insight-name}.json
cohorts/
{cohort-id}_{cohort-name}.json
func NewPostHogProvider ¶ added in v0.1.32
func NewPostHogProvider() *PostHogProvider
func (*PostHogProvider) ExecuteQuery ¶ added in v0.1.32
func (p *PostHogProvider) ExecuteQuery(ctx context.Context, pctx *sources.ProviderContext, spec sources.QuerySpec) (*sources.QueryResponse, error)
ExecuteQuery runs a PostHog search query and returns results. Implements the sources.QueryExecutor interface for source view queries.
func (*PostHogProvider) FormatFilename ¶ added in v0.1.32
func (p *PostHogProvider) FormatFilename(format string, metadata map[string]string) string
FormatFilename generates a filename from metadata using a format template. Supported placeholders: {id}, {key}, {name}, {event}, {date}, {short_id}, {active}, {count}
func (*PostHogProvider) IsNativeBrowsable ¶ added in v0.1.32
func (p *PostHogProvider) IsNativeBrowsable() bool
IsNativeBrowsable returns true — PostHog exposes a native file tree.
func (*PostHogProvider) Name ¶ added in v0.1.32
func (p *PostHogProvider) Name() string
func (*PostHogProvider) Read ¶ added in v0.1.32
func (p *PostHogProvider) Read(ctx context.Context, pctx *sources.ProviderContext, path string, offset, length int64) ([]byte, error)
Read reads file content.
func (*PostHogProvider) ReadDir ¶ added in v0.1.32
func (p *PostHogProvider) ReadDir(ctx context.Context, pctx *sources.ProviderContext, path string) ([]sources.DirEntry, error)
ReadDir lists directory contents.
func (*PostHogProvider) ReadResult ¶ added in v0.1.32
func (p *PostHogProvider) ReadResult(ctx context.Context, pctx *sources.ProviderContext, resultID string) ([]byte, error)
ReadResult fetches content for a specific PostHog resource by its composite ID. Composite ID format: "{projectID}:{resourceType}:{resourceID}"
func (*PostHogProvider) Readlink ¶ added in v0.1.32
func (p *PostHogProvider) Readlink(_ context.Context, _ *sources.ProviderContext, _ string) (string, error)
func (*PostHogProvider) Search ¶ added in v0.1.32
func (p *PostHogProvider) Search(_ context.Context, _ *sources.ProviderContext, _ string, _ int) ([]sources.SearchResult, error)
func (*PostHogProvider) Stat ¶ added in v0.1.32
func (p *PostHogProvider) Stat(ctx context.Context, pctx *sources.ProviderContext, path string) (*sources.FileInfo, error)
Stat returns file/directory attributes for a path within the integration.
func (*PostHogProvider) ValidateCredentials ¶ added in v0.1.32
func (p *PostHogProvider) ValidateCredentials(ctx context.Context, creds *types.IntegrationCredentials) error
ValidateCredentials checks that the API key is valid by calling the projects endpoint. For project-scoped keys (Extra["project_id"] set), it calls GetProject instead of ListProjects.
type SlackProvider ¶ added in v0.1.9
type SlackProvider struct {
// contains filtered or unexported fields
}
SlackProvider implements sources.Provider for Slack integration. It exposes Slack data as a read-only filesystem under /sources/slack/ Primary usage is via smart queries: mkdir /sources/slack/team-updates
func NewSlackProvider ¶ added in v0.1.9
func NewSlackProvider() *SlackProvider
NewSlackProvider creates a new Slack source provider
func (*SlackProvider) DefaultResourceType ¶ added in v0.1.50
func (s *SlackProvider) DefaultResourceType() string
DefaultResourceType implements sources.ResourceLister.
func (*SlackProvider) ExecuteQuery ¶ added in v0.1.9
func (s *SlackProvider) ExecuteQuery(ctx context.Context, pctx *sources.ProviderContext, spec sources.QuerySpec) (*sources.QueryResponse, error)
ExecuteQuery runs a Slack search query and returns results with generated filenames. This implements the sources.QueryExecutor interface for filesystem queries. Users create smart queries like: mkdir /sources/slack/team-updates
func (*SlackProvider) FormatFilename ¶ added in v0.1.9
func (s *SlackProvider) FormatFilename(format string, metadata map[string]string) string
FormatFilename generates a filename from metadata using a format template. Supported placeholders: {id}, {channel}, {user}, {date}, {text} This implements the sources.QueryExecutor interface.
func (*SlackProvider) ListResources ¶ added in v0.1.50
func (s *SlackProvider) ListResources(ctx context.Context, pctx *sources.ProviderContext, resourceType string) ([]sources.Resource, error)
ListResources implements sources.ResourceLister.
func (*SlackProvider) Name ¶ added in v0.1.9
func (s *SlackProvider) Name() string
func (*SlackProvider) Read ¶ added in v0.1.9
func (s *SlackProvider) Read(ctx context.Context, pctx *sources.ProviderContext, path string, offset, length int64) ([]byte, error)
Read reads file content
func (*SlackProvider) ReadDir ¶ added in v0.1.9
func (s *SlackProvider) ReadDir(ctx context.Context, pctx *sources.ProviderContext, path string) ([]sources.DirEntry, error)
ReadDir lists directory contents
func (*SlackProvider) ReadResult ¶ added in v0.1.9
func (s *SlackProvider) ReadResult(ctx context.Context, pctx *sources.ProviderContext, resultID string) ([]byte, error)
ReadResult fetches the content of a Slack message by its timestamp. Returns the message formatted as readable text. This implements the sources.QueryExecutor interface.
func (*SlackProvider) Readlink ¶ added in v0.1.9
func (s *SlackProvider) Readlink(ctx context.Context, pctx *sources.ProviderContext, path string) (string, error)
Readlink is not supported for Slack
func (*SlackProvider) Search ¶ added in v0.1.9
func (s *SlackProvider) Search(ctx context.Context, pctx *sources.ProviderContext, query string, limit int) ([]sources.SearchResult, error)
Search executes a Slack search query and returns results Uses Slack's search.messages API
type WebProvider ¶ added in v0.1.49
type WebProvider struct {
// contains filtered or unexported fields
}
WebProvider discovers and scrapes web pages via Firecrawl, exposing each page as a markdown file through smart queries.
Two modes (selected by the "web_mode" metadata key):
map (default) — discover pages on a site via /map, scrape lazily search — web search via /search, scrape top results
Usage:
mkdir /sources/web/hennessy-cocktails # map mode (URL in guidance) mkdir /sources/web/latest-ai-news # search mode (no URL)
func NewWebProvider ¶ added in v0.1.49
func NewWebProvider(apiKey string) *WebProvider
func (*WebProvider) ExecuteQuery ¶ added in v0.1.49
func (w *WebProvider) ExecuteQuery(ctx context.Context, _ *sources.ProviderContext, spec sources.QuerySpec) (*sources.QueryResponse, error)
ExecuteQuery discovers pages via /map or /search depending on the "web_mode" metadata key. Each result is scraped lazily in ReadResult.
func (*WebProvider) FormatFilename ¶ added in v0.1.49
func (w *WebProvider) FormatFilename(format string, meta map[string]string) string
FormatFilename replaces {id}, {title}, {path}, {date} placeholders.
func (*WebProvider) Name ¶ added in v0.1.49
func (w *WebProvider) Name() string
func (*WebProvider) Read ¶ added in v0.1.49
func (w *WebProvider) Read(_ context.Context, _ *sources.ProviderContext, _ string, _, _ int64) ([]byte, error)
func (*WebProvider) ReadDir ¶ added in v0.1.49
func (w *WebProvider) ReadDir(_ context.Context, _ *sources.ProviderContext, _ string) ([]sources.DirEntry, error)
func (*WebProvider) ReadResult ¶ added in v0.1.49
func (w *WebProvider) ReadResult(ctx context.Context, _ *sources.ProviderContext, resultID string) ([]byte, error)
ReadResult scrapes a single page and returns its markdown content.
func (*WebProvider) Readlink ¶ added in v0.1.49
func (w *WebProvider) Readlink(_ context.Context, _ *sources.ProviderContext, _ string) (string, error)
func (*WebProvider) Search ¶ added in v0.1.49
func (w *WebProvider) Search(_ context.Context, _ *sources.ProviderContext, _ string, _ int) ([]sources.SearchResult, error)