providers

package
v0.1.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGmailAPICallCount

func GetGmailAPICallCount() int64

GetGmailAPICallCount returns the current API call count

func ResetGmailAPICallCount

func ResetGmailAPICallCount()

ResetGmailAPICallCount resets the API call counter

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

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 (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'")

func (*GDriveProvider) Stat

Stat returns file/directory attributes

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) ExecuteQuery

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) 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 (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)

func (*GitHubProvider) Stat

Stat returns file/directory attributes

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

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) ReadSearchResult

func (g *GmailProvider) ReadSearchResult(ctx context.Context, pctx *sources.ProviderContext, messageID string) ([]byte, error)

ReadSearchResult reads the content of a search result by message ID

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")

func (*GmailProvider) Stat

Stat returns file/directory attributes

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) ExecuteQuery added in v0.1.9

func (*LinearProvider) FormatFilename added in v0.1.9

func (l *LinearProvider) FormatFilename(format string, metadata map[string]string) string

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 (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)

func (*LinearProvider) Stat added in v0.1.9

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

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 (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

func (*NotionProvider) Stat

Stat returns file/directory attributes

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) ExecuteQuery added in v0.1.9

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) 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 (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

func (*SlackProvider) Stat added in v0.1.9

Stat returns file/directory attributes

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL