infrastructure

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 5 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 BitbucketRepoLister added in v0.22.0

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

BitbucketRepoLister adapts *bitbucket.Client to the RepoLister port: Bitbucket lists a workspace's repositories, which fills the same "org" slot GitHub's org-repo listing does for wildcard expansion.

func NewBitbucketRepoLister added in v0.22.0

func NewBitbucketRepoLister(client *bitbucket.Client) *BitbucketRepoLister

NewBitbucketRepoLister adapts a Bitbucket client to the RepoLister port.

func (*BitbucketRepoLister) ListOrgRepos added in v0.22.0

func (l *BitbucketRepoLister) ListOrgRepos(ctx context.Context, workspace string) ([]string, error)

ListOrgRepos lists the repositories in the given Bitbucket workspace, satisfying the RepoLister port used for wildcard expansion.

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