slackapi

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceUser = "api-user"
	SourceBot  = "api-bot"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(tokens config.Tokens) *Client

func NewWithOptions

func NewWithOptions(tokens config.Tokens, apiURL string, httpClient *http.Client) *Client

func (*Client) Doctor

func (c *Client) Doctor(ctx context.Context) (Diagnostics, error)

func (*Client) HandleEventsAPIEvent

func (c *Client) HandleEventsAPIEvent(ctx context.Context, st *store.Store, workspaceID string, event slackevents.EventsAPIEvent) error

func (*Client) Sync

func (c *Client) Sync(ctx context.Context, st *store.Store, opts SyncOptions) error

func (*Client) Tail

func (c *Client) Tail(ctx context.Context, st *store.Store, workspaceID string, repairEvery time.Duration) error

func (*Client) WithIncludeDMs

func (c *Client) WithIncludeDMs(include bool) *Client

func (*Client) WithLogger

func (c *Client) WithLogger(logger *slog.Logger) *Client

type Diagnostics

type Diagnostics struct {
	BotConfigured     bool   `json:"bot_configured"`
	AppConfigured     bool   `json:"app_configured"`
	UserConfigured    bool   `json:"user_configured"`
	ThreadCoverage    string `json:"thread_coverage"`
	DMsIncluded       bool   `json:"dms_included"`
	DMsMissingScope   string `json:"dms_missing_scope,omitempty"`
	BotAuthTeamID     string `json:"bot_auth_team_id,omitempty"`
	BotAuthTeam       string `json:"bot_auth_team,omitempty"`
	UserAuthAvailable bool   `json:"user_auth_available"`
	UserAuthError     string `json:"user_auth_error,omitempty"`
	AppTailAvailable  bool   `json:"app_tail_available"`
}

type SyncOptions

type SyncOptions struct {
	WorkspaceID     string
	Channels        []string
	ExcludeChannels []string
	Since           string
	Full            bool
	LatestOnly      bool
	Concurrency     int
	AutoJoin        *bool
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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