Documentation
¶
Index ¶
- Constants
- func AuthService(t require.TestingT) *authorization.AuthService
- func CreateBlueprint(t *testing.T, orgID uuid.UUID, nodes []models.Node, edges []models.Edge, ...) *models.Blueprint
- func CreateCanvas(t require.TestingT, orgID uuid.UUID, userID uuid.UUID, ...) (*models.Canvas, []models.CanvasNode)
- func CreateCanvasNodeExecution(t require.TestingT, canvasID uuid.UUID, nodeID string, rootEventID uuid.UUID, ...) *models.CanvasNodeExecution
- func CreateIntegrationWithCapabilities(t require.TestingT, organizationID uuid.UUID, ...) *models.Integration
- func CreateNextNodeExecution(t require.TestingT, workflowID uuid.UUID, nodeID string, rootEventID uuid.UUID, ...) *models.CanvasNodeExecution
- func CreateNodeExecutionWithConfiguration(t require.TestingT, workflowID uuid.UUID, nodeID string, rootEventID uuid.UUID, ...) *models.CanvasNodeExecution
- func CreateOrganization(t require.TestingT, r *ResourceRegistry, userID uuid.UUID) *models.Organization
- func CreateQueueItem(t require.TestingT, workflowID uuid.UUID, nodeID string, rootEventID uuid.UUID, ...) *models.CanvasNodeQueueItem
- func CreateSecret(t *testing.T, r *ResourceRegistry, secretData map[string]string) (*models.Secret, error)
- func CreateUser(t *testing.T, r *ResourceRegistry, organizationID uuid.UUID) *models.User
- func EmitCanvasEventForNode(t require.TestingT, canvasID uuid.UUID, nodeID string, channel string, ...) *models.CanvasEvent
- func EmitCanvasEventForNodeWithData(t require.TestingT, canvasID uuid.UUID, nodeID string, channel string, ...) *models.CanvasEvent
- func NewOIDCProvider() oidc.Provider
- func RandomName(prefix string) string
- func SetCanvasChangeManagementEnabled(t require.TestingT, canvasID uuid.UUID, enabled bool)
- func VerifyCanvasEventsCount(t require.TestingT, canvasID uuid.UUID, expected int)
- func VerifyCanvasNodeEventsCount(t require.TestingT, canvasID uuid.UUID, nodeID string, expected int)
- func VerifyNodeExecutionKVCount(t require.TestingT, workflowID uuid.UUID, expected int)
- func VerifyNodeExecutionsCount(t require.TestingT, workflowID uuid.UUID, expected int)
- func VerifyNodeQueueCount(t require.TestingT, workflowID uuid.UUID, expected int)
- func VerifyNodeRequestCount(t require.TestingT, workflowID uuid.UUID, expected int)
- type AgentProviderCreateSessionCall
- type AgentProviderDefineOutcomeCall
- type AgentProviderDeleteSessionCall
- type AgentProviderInterruptSessionCall
- type AgentProviderSendMessageCall
- type AgentProviderSession
- type ResourceRegistry
- type SetupOptions
- type TestAgentProvider
- func (p *TestAgentProvider) CloseStream(providerSessionID string) error
- func (p *TestAgentProvider) CreateSession(_ context.Context, opts agents.CreateSessionOptions) (*agents.CreateSessionResult, error)
- func (p *TestAgentProvider) CreateSessionCalls() []AgentProviderCreateSessionCall
- func (p *TestAgentProvider) DefineOutcome(_ context.Context, providerSessionID string, opts agents.DefineOutcomeOptions) error
- func (p *TestAgentProvider) DefineOutcomeCalls() []AgentProviderDefineOutcomeCall
- func (p *TestAgentProvider) DeleteSession(_ context.Context, providerSessionID string) error
- func (p *TestAgentProvider) DeleteSessionCalls() []AgentProviderDeleteSessionCall
- func (p *TestAgentProvider) InterruptSession(_ context.Context, providerSessionID string) error
- func (p *TestAgentProvider) InterruptSessionCalls() []AgentProviderInterruptSessionCall
- func (p *TestAgentProvider) Name() string
- func (p *TestAgentProvider) QueueError(providerSessionID string, err error) error
- func (p *TestAgentProvider) QueueEvents(providerSessionID string, events ...agents.ProviderEvent) error
- func (p *TestAgentProvider) Reset()
- func (p *TestAgentProvider) SendMessage(_ context.Context, providerSessionID string, message string, ...) error
- func (p *TestAgentProvider) SendMessageCalls() []AgentProviderSendMessageCall
- func (p *TestAgentProvider) Session(providerSessionID string) (AgentProviderSession, bool)
- func (p *TestAgentProvider) SetCreateSessionError(err error)
- func (p *TestAgentProvider) SetDefineOutcomeError(err error)
- func (p *TestAgentProvider) SetDefineOutcomeEvents(events ...agents.ProviderEvent)
- func (p *TestAgentProvider) SetDefineOutcomeHandler(handler func(AgentProviderDefineOutcomeCall) ([]agents.ProviderEvent, error))
- func (p *TestAgentProvider) SetDeleteSessionError(err error)
- func (p *TestAgentProvider) SetInterruptSessionError(err error)
- func (p *TestAgentProvider) SetName(name string)
- func (p *TestAgentProvider) SetSendMessageError(err error)
- func (p *TestAgentProvider) SetSendMessageEvents(events ...agents.ProviderEvent)
- func (p *TestAgentProvider) SetSendMessageHandler(handler func(AgentProviderSendMessageCall) ([]agents.ProviderEvent, error))
- func (p *TestAgentProvider) SetSessionIDProvider(provider func() string)
- func (p *TestAgentProvider) SetStreamError(err error)
- func (p *TestAgentProvider) StreamEvents(ctx context.Context, providerSessionID string, ...) error
- type TestOIDCProvider
Constants ¶
View Source
const (
TestAgentProviderName = "test"
)
Variables ¶
This section is empty.
Functions ¶
func AuthService ¶
func AuthService(t require.TestingT) *authorization.AuthService
func CreateBlueprint ¶
func CreateCanvas ¶ added in v0.6.0
func CreateCanvasNodeExecution ¶ added in v0.6.0
func CreateIntegrationWithCapabilities ¶ added in v0.20.0
func CreateIntegrationWithCapabilities( t require.TestingT, organizationID uuid.UUID, capabilities []models.CapabilityState, ) *models.Integration
func CreateNextNodeExecution ¶
func CreateOrganization ¶
func CreateOrganization(t require.TestingT, r *ResourceRegistry, userID uuid.UUID) *models.Organization
func CreateQueueItem ¶ added in v0.6.0
func CreateSecret ¶
func CreateUser ¶
func EmitCanvasEventForNode ¶ added in v0.6.0
func EmitCanvasEventForNodeWithData ¶ added in v0.6.0
func NewOIDCProvider ¶ added in v0.1.1
func RandomName ¶
func SetCanvasChangeManagementEnabled ¶ added in v0.19.0
func VerifyCanvasEventsCount ¶ added in v0.6.0
func VerifyCanvasNodeEventsCount ¶ added in v0.7.0
func VerifyNodeExecutionKVCount ¶ added in v0.6.0
func VerifyNodeExecutionsCount ¶ added in v0.6.0
func VerifyNodeQueueCount ¶ added in v0.6.0
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 Setup(t require.TestingT) *ResourceRegistry
func SetupWithOptions ¶
func SetupWithOptions(t require.TestingT, options SetupOptions) *ResourceRegistry
func (*ResourceRegistry) Close ¶
func (r *ResourceRegistry) Close()
type SetupOptions ¶
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 (p *TestAgentProvider) CreateSession( _ context.Context, opts agents.CreateSessionOptions, ) (*agents.CreateSessionResult, error)
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
Click to show internal directories.
Click to hide internal directories.