slack

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package slack is a dfetch Connector backed by the Slack Web API. It exposes the channels, users, messages, and search tables under the SQL schema "slack" and pushes down equality/range filters and LIMIT to the API where it can. Auth is a single Authorization header: either $SLACK_TOKEN (a bare token, sent as "Bearer <token>") or params.auth_header_command, whose output is used verbatim.

Browser session tokens (xoxc-...) additionally require Slack's "d" cookie. Set it with either $SLACK_COOKIE (the bare cookie value, sent as "Cookie: d=<value>") or params.cookie_command, whose output is used verbatim as the Cookie header.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(params map[string]any) (source.Connector, error)

New builds a Slack connector. Supported params: "base_url" (override the API host, used in tests), "auth_header_command" (argv whose stdout is used verbatim as the Authorization header when $SLACK_TOKEN is unset), and "cookie_command" (argv whose stdout is used verbatim as the Cookie header when $SLACK_COOKIE is unset).

Types

type Connector

type Connector struct {
	// contains filtered or unexported fields
}

Connector talks to the Slack Web API.

func (*Connector) Scan

func (c *Connector) Scan(ctx context.Context, req source.ScanRequest, emit func(*source.Rows) error) error

Scan dispatches to the per-table fetchers, which emit one chunk per API page.

func (*Connector) Tables

func (c *Connector) Tables() []source.TableSchema

Tables returns the schemas of the slack.* tables.

Jump to

Keyboard shortcuts

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