support

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestAgentProviderName = "test"
)

Variables

This section is empty.

Functions

func CreateBlueprint

func CreateBlueprint(t *testing.T, orgID uuid.UUID, nodes []models.Node, edges []models.Edge, outputChannels []models.BlueprintOutputChannel) *models.Blueprint

func CreateCanvas added in v0.6.0

func CreateCanvas(t require.TestingT, orgID uuid.UUID, userID uuid.UUID, nodes []models.CanvasNode, edges []models.Edge) (*models.Canvas, []models.CanvasNode)

func CreateCanvasNodeExecution added in v0.6.0

func CreateCanvasNodeExecution(
	t require.TestingT,
	canvasID uuid.UUID,
	nodeID string,
	rootEventID uuid.UUID,
	eventID uuid.UUID,
	parentExecutionID *uuid.UUID,
) *models.CanvasNodeExecution

func CreateIntegrationWithCapabilities added in v0.20.0

func CreateIntegrationWithCapabilities(
	t require.TestingT,
	organizationID uuid.UUID,
	capabilities []models.CapabilityState,
) *models.Integration

func CreateNextNodeExecution

func CreateNextNodeExecution(
	t require.TestingT,
	workflowID uuid.UUID,
	nodeID string,
	rootEventID uuid.UUID,
	eventID uuid.UUID,
	previous *uuid.UUID,
) *models.CanvasNodeExecution

func CreateNodeExecutionWithConfiguration

func CreateNodeExecutionWithConfiguration(
	t require.TestingT,
	workflowID uuid.UUID,
	nodeID string,
	rootEventID uuid.UUID,
	eventID uuid.UUID,
	parentExecutionID *uuid.UUID,
	configuration map[string]any,
) *models.CanvasNodeExecution

func CreateOrganization

func CreateOrganization(t require.TestingT, r *ResourceRegistry, userID uuid.UUID) *models.Organization

func CreateQueueItem added in v0.6.0

func CreateQueueItem(t require.TestingT, workflowID uuid.UUID, nodeID string, rootEventID uuid.UUID, eventID uuid.UUID) *models.CanvasNodeQueueItem

func CreateSecret

func CreateSecret(t *testing.T, r *ResourceRegistry, secretData map[string]string) (*models.Secret, error)

func CreateUser

func CreateUser(t *testing.T, r *ResourceRegistry, organizationID uuid.UUID) *models.User

func EmitCanvasEventForNode added in v0.6.0

func EmitCanvasEventForNode(t require.TestingT, canvasID uuid.UUID, nodeID string, channel string, executionID *uuid.UUID) *models.CanvasEvent

func EmitCanvasEventForNodeWithData added in v0.6.0

func EmitCanvasEventForNodeWithData(
	t require.TestingT,
	canvasID uuid.UUID,
	nodeID string,
	channel string,
	executionID *uuid.UUID,
	data map[string]any,
) *models.CanvasEvent

func NewOIDCProvider added in v0.1.1

func NewOIDCProvider() oidc.Provider

func RandomName

func RandomName(prefix string) string

func SetCanvasChangeManagementEnabled added in v0.19.0

func SetCanvasChangeManagementEnabled(t require.TestingT, canvasID uuid.UUID, enabled bool)

func VerifyCanvasEventsCount added in v0.6.0

func VerifyCanvasEventsCount(t require.TestingT, canvasID uuid.UUID, expected int)

func VerifyCanvasNodeEventsCount added in v0.7.0

func VerifyCanvasNodeEventsCount(t require.TestingT, canvasID uuid.UUID, nodeID string, expected int)

func VerifyNodeExecutionKVCount added in v0.6.0

func VerifyNodeExecutionKVCount(t require.TestingT, workflowID uuid.UUID, expected int)

func VerifyNodeExecutionsCount added in v0.6.0

func VerifyNodeExecutionsCount(t require.TestingT, workflowID uuid.UUID, expected int)

func VerifyNodeQueueCount added in v0.6.0

func VerifyNodeQueueCount(t require.TestingT, workflowID uuid.UUID, expected int)

func VerifyNodeRequestCount added in v0.6.0

func VerifyNodeRequestCount(t require.TestingT, workflowID uuid.UUID, expected int)

Types

type AgentProviderCreateSessionCall added in v0.22.0

type AgentProviderCreateSessionCall struct {
	Options agents.CreateSessionOptions
}

type AgentProviderDefineOutcomeCall added in v0.22.0

type AgentProviderDefineOutcomeCall struct {
	ProviderSessionID string
	Options           agents.DefineOutcomeOptions
}

type AgentProviderDeleteSessionCall added in v0.22.0

type AgentProviderDeleteSessionCall struct {
	ProviderSessionID string
}

type AgentProviderInterruptSessionCall added in v0.22.0

type AgentProviderInterruptSessionCall struct {
	ProviderSessionID string
}

type AgentProviderSendMessageCall added in v0.22.0

type AgentProviderSendMessageCall struct {
	ProviderSessionID string
	Message           string
	Options           agents.SendMessageOptions
}

type AgentProviderSession added in v0.22.0

type AgentProviderSession struct {
	ProviderSessionID string
	CreateOptions     agents.CreateSessionOptions
	Interrupted       bool
	Deleted           bool
}

type ResourceRegistry

type ResourceRegistry struct {
	User         uuid.UUID
	UserModel    *models.User
	Organization *models.Organization
	Account      *models.Account
	Encryptor    crypto.Encryptor
	AuthService  *authorization.AuthService
	Registry     *registry.Registry
}

func Setup

func SetupWithOptions

func SetupWithOptions(t require.TestingT, options SetupOptions) *ResourceRegistry

func (*ResourceRegistry) Close

func (r *ResourceRegistry) Close()

type SetupOptions

type SetupOptions struct {
	Source    bool
	Stage     bool
	Approvals int
}

type TestAgentProvider added in v0.22.0

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

func NewAgentProvider added in v0.22.0

func NewAgentProvider() *TestAgentProvider

func (*TestAgentProvider) CloseStream added in v0.22.0

func (p *TestAgentProvider) CloseStream(providerSessionID string) error

func (*TestAgentProvider) CreateSession added in v0.22.0

func (*TestAgentProvider) CreateSessionCalls added in v0.22.0

func (p *TestAgentProvider) CreateSessionCalls() []AgentProviderCreateSessionCall

func (*TestAgentProvider) DefineOutcome added in v0.22.0

func (p *TestAgentProvider) DefineOutcome(
	_ context.Context,
	providerSessionID string,
	opts agents.DefineOutcomeOptions,
) error

func (*TestAgentProvider) DefineOutcomeCalls added in v0.22.0

func (p *TestAgentProvider) DefineOutcomeCalls() []AgentProviderDefineOutcomeCall

func (*TestAgentProvider) DeleteSession added in v0.22.0

func (p *TestAgentProvider) DeleteSession(_ context.Context, providerSessionID string) error

func (*TestAgentProvider) DeleteSessionCalls added in v0.22.0

func (p *TestAgentProvider) DeleteSessionCalls() []AgentProviderDeleteSessionCall

func (*TestAgentProvider) InterruptSession added in v0.22.0

func (p *TestAgentProvider) InterruptSession(_ context.Context, providerSessionID string) error

func (*TestAgentProvider) InterruptSessionCalls added in v0.22.0

func (p *TestAgentProvider) InterruptSessionCalls() []AgentProviderInterruptSessionCall

func (*TestAgentProvider) Name added in v0.22.0

func (p *TestAgentProvider) Name() string

func (*TestAgentProvider) QueueError added in v0.22.0

func (p *TestAgentProvider) QueueError(providerSessionID string, err error) error

func (*TestAgentProvider) QueueEvents added in v0.22.0

func (p *TestAgentProvider) QueueEvents(providerSessionID string, events ...agents.ProviderEvent) error

func (*TestAgentProvider) Reset added in v0.22.0

func (p *TestAgentProvider) Reset()

func (*TestAgentProvider) SendMessage added in v0.22.0

func (p *TestAgentProvider) SendMessage(
	_ context.Context,
	providerSessionID string,
	message string,
	opts agents.SendMessageOptions,
) error

func (*TestAgentProvider) SendMessageCalls added in v0.22.0

func (p *TestAgentProvider) SendMessageCalls() []AgentProviderSendMessageCall

func (*TestAgentProvider) Session added in v0.22.0

func (p *TestAgentProvider) Session(providerSessionID string) (AgentProviderSession, bool)

func (*TestAgentProvider) SetCreateSessionError added in v0.22.0

func (p *TestAgentProvider) SetCreateSessionError(err error)

func (*TestAgentProvider) SetDefineOutcomeError added in v0.22.0

func (p *TestAgentProvider) SetDefineOutcomeError(err error)

func (*TestAgentProvider) SetDefineOutcomeEvents added in v0.22.0

func (p *TestAgentProvider) SetDefineOutcomeEvents(events ...agents.ProviderEvent)

func (*TestAgentProvider) SetDefineOutcomeHandler added in v0.22.0

func (p *TestAgentProvider) SetDefineOutcomeHandler(
	handler func(AgentProviderDefineOutcomeCall) ([]agents.ProviderEvent, error),
)

func (*TestAgentProvider) SetDeleteSessionError added in v0.22.0

func (p *TestAgentProvider) SetDeleteSessionError(err error)

func (*TestAgentProvider) SetInterruptSessionError added in v0.22.0

func (p *TestAgentProvider) SetInterruptSessionError(err error)

func (*TestAgentProvider) SetName added in v0.22.0

func (p *TestAgentProvider) SetName(name string)

func (*TestAgentProvider) SetSendMessageError added in v0.22.0

func (p *TestAgentProvider) SetSendMessageError(err error)

func (*TestAgentProvider) SetSendMessageEvents added in v0.22.0

func (p *TestAgentProvider) SetSendMessageEvents(events ...agents.ProviderEvent)

func (*TestAgentProvider) SetSendMessageHandler added in v0.22.0

func (p *TestAgentProvider) SetSendMessageHandler(
	handler func(AgentProviderSendMessageCall) ([]agents.ProviderEvent, error),
)

func (*TestAgentProvider) SetSessionIDProvider added in v0.22.0

func (p *TestAgentProvider) SetSessionIDProvider(provider func() string)

func (*TestAgentProvider) SetStreamError added in v0.22.0

func (p *TestAgentProvider) SetStreamError(err error)

func (*TestAgentProvider) StreamEvents added in v0.22.0

func (p *TestAgentProvider) StreamEvents(
	ctx context.Context,
	providerSessionID string,
	onEvent func(agents.ProviderEvent) error,
) error

type TestOIDCProvider added in v0.1.1

type TestOIDCProvider struct{}

func (*TestOIDCProvider) PublicJWKs added in v0.1.1

func (p *TestOIDCProvider) PublicJWKs() []oidc.PublicJWK

func (*TestOIDCProvider) Sign added in v0.1.1

func (p *TestOIDCProvider) Sign(subject string, duration time.Duration, audience string, additionalClaims map[string]any) (string, error)

Directories

Path Synopsis
mocks

Jump to

Keyboard shortcuts

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