infrastructure

package
v0.21.2 Latest Latest
Warning

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

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

Documentation

Overview

Package infrastructure holds the validation adapters that satisfy the domain ports over real clients — today, a Slack probe over the platform Slack client. It is the only validation layer permitted to import an SDK client package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SlackProbe

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

SlackProbe adapts the platform Slack client to the validation domain's SlackChecker port. It maps the client's ChannelInfo to the domain type and translates the client's API error into the domain's SlackAPIError so the application can classify failures without importing the Slack SDK.

func NewSlackProbe

func NewSlackProbe(client *slack.Client) *SlackProbe

NewSlackProbe wraps a Slack client as a validation SlackChecker.

func (*SlackProbe) AuthTest

func (p *SlackProbe) AuthTest(ctx context.Context) (userID string, scopes []string, err error)

AuthTest verifies the token and returns the granted scopes, translating any Slack API error into a domain SlackAPIError.

func (*SlackProbe) ConversationsInfo

func (p *SlackProbe) ConversationsInfo(ctx context.Context, channel string) (domain.ChannelInfo, error)

ConversationsInfo returns the domain view of a channel's metadata, translating any Slack API error into a domain SlackAPIError.

Jump to

Keyboard shortcuts

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