Documentation
¶
Index ¶
- Variables
- type APIDestination
- type APIDestinationResolver
- type AppSyncParameters
- type Archive
- type ArchiveJanitor
- type AwsVpcConfiguration
- type BatchArrayProperties
- type BatchParameters
- type CapacityProviderStrategyItem
- type CloudWatchLogsPublisher
- type CodeBinding
- type Connection
- type ConnectionAPIKeyAuthParameters
- type ConnectionAuthParameters
- type ConnectionBasicAuthParameters
- type ConnectionBodyParameter
- type ConnectionHTTPParameters
- type ConnectionHeaderParameter
- type ConnectionOAuthClientParameters
- type ConnectionOAuthParameters
- type ConnectionQueryStringParameter
- type CreateAPIDestinationInput
- type CreateArchiveInput
- type CreateConnectionInput
- type CreateEndpointInput
- type CreatePipeInput
- type CreateRegistryInput
- type CreateSchemaInput
- type DeadLetterConfig
- type DeliveryTargets
- type DescribeCodeBindingInput
- type ECSTaskRunner
- type EcsParameters
- type EcsTag
- type Endpoint
- type EndpointEventBus
- type EventBus
- type EventBusPolicy
- type EventBusPolicyStatement
- type EventEntry
- type EventLogEntry
- type EventResultEntry
- type EventSource
- type FailedEntry
- type FailoverConfig
- type GetDiscoveredSchemaInput
- type GetEventBusPolicyInput
- type HTTPParameters
- type Handler
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) SetArchiveJanitor(j *ArchiveJanitor)
- func (h *Handler) SetScheduler(s *Scheduler)
- func (h *Handler) Shutdown(ctx context.Context)
- func (h *Handler) Snapshot(ctx context.Context) []byte
- func (h *Handler) StartWorker(ctx context.Context) error
- type InMemoryBackend
- func (b *InMemoryBackend) ActivateEventSource(ctx context.Context, name string) error
- func (b *InMemoryBackend) AddAPIDestinationInternal(dst *APIDestination)
- func (b *InMemoryBackend) AddArchiveInternal(archive *Archive)
- func (b *InMemoryBackend) AddConnectionInternal(conn *Connection)
- func (b *InMemoryBackend) AddEndpointInternal(ep *Endpoint)
- func (b *InMemoryBackend) AddEventSourceInternal(src *EventSource)
- func (b *InMemoryBackend) AddPartnerSourceInternal(src *PartnerEventSource)
- func (b *InMemoryBackend) AddReplayInternal(replay *Replay)
- func (b *InMemoryBackend) CancelReplay(ctx context.Context, replayName string) (*Replay, error)
- func (b *InMemoryBackend) Close()
- func (b *InMemoryBackend) CreateAPIDestination(ctx context.Context, input CreateAPIDestinationInput) (*APIDestination, error)
- func (b *InMemoryBackend) CreateArchive(ctx context.Context, input CreateArchiveInput) (*Archive, error)
- func (b *InMemoryBackend) CreateConnection(ctx context.Context, input CreateConnectionInput) (*Connection, error)
- func (b *InMemoryBackend) CreateEndpoint(ctx context.Context, input CreateEndpointInput) (*Endpoint, error)
- func (b *InMemoryBackend) CreateEventBus(ctx context.Context, name, description string) (*EventBus, error)
- func (b *InMemoryBackend) CreatePartnerEventSource(ctx context.Context, name, account string) (*PartnerEventSource, error)
- func (b *InMemoryBackend) CreatePipe(ctx context.Context, input CreatePipeInput) (*Pipe, error)
- func (b *InMemoryBackend) CreateRegistry(ctx context.Context, input CreateRegistryInput) (*SchemaRegistry, error)
- func (b *InMemoryBackend) CreateSchema(ctx context.Context, input CreateSchemaInput) (*Schema, error)
- func (b *InMemoryBackend) DeactivateEventSource(ctx context.Context, name string) error
- func (b *InMemoryBackend) DeauthorizeConnection(ctx context.Context, name string) (*Connection, error)
- func (b *InMemoryBackend) DeleteAPIDestination(ctx context.Context, name string) error
- func (b *InMemoryBackend) DeleteArchive(ctx context.Context, name string) error
- func (b *InMemoryBackend) DeleteConnection(ctx context.Context, name string) error
- func (b *InMemoryBackend) DeleteEndpoint(ctx context.Context, name string) error
- func (b *InMemoryBackend) DeleteEventBus(ctx context.Context, name string) error
- func (b *InMemoryBackend) DeletePartnerEventSource(ctx context.Context, name string) error
- func (b *InMemoryBackend) DeletePipe(ctx context.Context, name string) error
- func (b *InMemoryBackend) DeleteRegistry(ctx context.Context, registryName string) error
- func (b *InMemoryBackend) DeleteRule(ctx context.Context, name, eventBusName string) error
- func (b *InMemoryBackend) DeleteSchema(ctx context.Context, registryName, schemaName string) error
- func (b *InMemoryBackend) DeleteSchemaVersion(ctx context.Context, registryName, schemaName, schemaVersion string) error
- func (b *InMemoryBackend) DescribeAPIDestination(ctx context.Context, name string) (*APIDestination, error)
- func (b *InMemoryBackend) DescribeArchive(ctx context.Context, name string) (*Archive, error)
- func (b *InMemoryBackend) DescribeCodeBinding(ctx context.Context, input DescribeCodeBindingInput) (*CodeBinding, error)
- func (b *InMemoryBackend) DescribeConnection(ctx context.Context, name string) (*Connection, error)
- func (b *InMemoryBackend) DescribeEndpoint(ctx context.Context, name string) (*Endpoint, error)
- func (b *InMemoryBackend) DescribeEventBus(ctx context.Context, name string) (*EventBus, error)
- func (b *InMemoryBackend) DescribeEventSource(ctx context.Context, name string) (*EventSource, error)
- func (b *InMemoryBackend) DescribePartnerEventSource(ctx context.Context, name string) (*PartnerEventSource, error)
- func (b *InMemoryBackend) DescribePipe(ctx context.Context, name string) (*Pipe, error)
- func (b *InMemoryBackend) DescribeRegistry(ctx context.Context, registryName string) (*SchemaRegistry, error)
- func (b *InMemoryBackend) DescribeReplay(ctx context.Context, name string) (*Replay, error)
- func (b *InMemoryBackend) DescribeRule(ctx context.Context, name, eventBusName string) (*Rule, error)
- func (b *InMemoryBackend) DescribeSchema(ctx context.Context, registryName, schemaName, schemaVersion string) (*Schema, error)
- func (b *InMemoryBackend) DescribeSchemaVersion(ctx context.Context, registryName, schemaName, schemaVersion string) (*SchemaVersion, error)
- func (b *InMemoryBackend) DisableRule(ctx context.Context, name, eventBusName string) error
- func (b *InMemoryBackend) EnableRule(ctx context.Context, name, eventBusName string) error
- func (b *InMemoryBackend) GetCodeBindingSource(ctx context.Context, registryName, schemaName, language, schemaVersion string) (string, error)
- func (b *InMemoryBackend) GetDiscoveredSchema(ctx context.Context, input GetDiscoveredSchemaInput) (string, error)
- func (b *InMemoryBackend) GetEventBusPolicy(ctx context.Context, eventBusName string) (string, error)
- func (b *InMemoryBackend) GetEventLog(ctx context.Context) []EventLogEntry
- func (b *InMemoryBackend) ListAPIDestinations(ctx context.Context, namePrefix, nextToken string) ([]APIDestination, string, error)
- func (b *InMemoryBackend) ListArchives(ctx context.Context, namePrefix, nextToken string) ([]Archive, string, error)
- func (b *InMemoryBackend) ListCodeBindings(ctx context.Context, input ListCodeBindingsInput) ([]CodeBinding, string, error)
- func (b *InMemoryBackend) ListConnections(ctx context.Context, namePrefix, nextToken string) ([]Connection, string, error)
- func (b *InMemoryBackend) ListEndpoints(ctx context.Context, namePrefix, nextToken string) ([]Endpoint, string, error)
- func (b *InMemoryBackend) ListEventBuses(ctx context.Context, namePrefix, nextToken string, limit int) ([]EventBus, string, error)
- func (b *InMemoryBackend) ListEventSources(ctx context.Context, namePrefix, nextToken string) ([]EventSource, string, error)
- func (b *InMemoryBackend) ListPartnerEventSources(ctx context.Context, namePrefix, nextToken string) ([]PartnerEventSource, string, error)
- func (b *InMemoryBackend) ListPipes(ctx context.Context, namePrefix, nextToken string) ([]Pipe, string, error)
- func (b *InMemoryBackend) ListRegistries(ctx context.Context, namePrefix, nextToken string) ([]SchemaRegistry, string, error)
- func (b *InMemoryBackend) ListReplays(ctx context.Context, namePrefix, nextToken string) ([]Replay, string, error)
- func (b *InMemoryBackend) ListRuleNamesByTarget(ctx context.Context, targetARN, eventBusName, nextToken string) ([]string, string, error)
- func (b *InMemoryBackend) ListRules(ctx context.Context, eventBusName, namePrefix, nextToken string, limit int) ([]Rule, string, error)
- func (b *InMemoryBackend) ListSchemaVersions(ctx context.Context, registryName, schemaName, nextToken string) ([]SchemaVersion, string, error)
- func (b *InMemoryBackend) ListSchemas(ctx context.Context, registryName, namePrefix, nextToken string) ([]Schema, string, error)
- func (b *InMemoryBackend) ListTargetsByRule(ctx context.Context, ruleName, eventBusName, nextToken string, limit int) ([]Target, string, error)
- func (b *InMemoryBackend) PutCodeBinding(ctx context.Context, input PutCodeBindingInput) (*CodeBinding, error)
- func (b *InMemoryBackend) PutEventBusPolicy(ctx context.Context, input PutEventBusPolicyInput) error
- func (b *InMemoryBackend) PutEvents(ctx context.Context, entries []EventEntry) ([]EventResultEntry, error)
- func (b *InMemoryBackend) PutPartnerEvents(ctx context.Context, entries []EventEntry) ([]EventResultEntry, error)
- func (b *InMemoryBackend) PutPermission(ctx context.Context, input PutPermissionInput) error
- func (b *InMemoryBackend) PutRule(ctx context.Context, input PutRuleInput) (*Rule, error)
- func (b *InMemoryBackend) PutTargets(ctx context.Context, ruleName, eventBusName string, targets []Target) ([]FailedEntry, error)
- func (b *InMemoryBackend) RemovePermission(ctx context.Context, input RemovePermissionInput) error
- func (b *InMemoryBackend) RemoveTargets(ctx context.Context, ruleName, eventBusName string, ids []string) ([]FailedEntry, error)
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) ResolveAPIDestination(destARN string) (*ResolvedAPIDestination, bool)
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) SFNPutEvents(ctx context.Context, entries []map[string]any) (int, error)
- func (b *InMemoryBackend) SearchSchemas(ctx context.Context, registryName, keywords, nextToken string) ([]Schema, string, error)
- func (b *InMemoryBackend) SetDeliveryTargets(dt *DeliveryTargets)
- func (b *InMemoryBackend) SetDeliveryTimeout(d time.Duration)
- func (b *InMemoryBackend) SetShutdownTimeout(d time.Duration)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StartReplay(ctx context.Context, input StartReplayInput) (*Replay, error)
- func (b *InMemoryBackend) TestEventPattern(ctx context.Context, pattern, event string) (bool, error)
- func (b *InMemoryBackend) UpdateAPIDestination(ctx context.Context, input UpdateAPIDestinationInput) (*APIDestination, error)
- func (b *InMemoryBackend) UpdateArchive(ctx context.Context, input UpdateArchiveInput) (*Archive, error)
- func (b *InMemoryBackend) UpdateConnection(ctx context.Context, input UpdateConnectionInput) (*Connection, error)
- func (b *InMemoryBackend) UpdateEndpoint(ctx context.Context, input UpdateEndpointInput) (*Endpoint, error)
- func (b *InMemoryBackend) UpdateEventBus(ctx context.Context, input UpdateEventBusInput) (*EventBus, error)
- func (b *InMemoryBackend) UpdatePipe(ctx context.Context, input UpdatePipeInput) (*Pipe, error)
- func (b *InMemoryBackend) UpdateRegistry(ctx context.Context, input UpdateRegistryInput) (*SchemaRegistry, error)
- func (b *InMemoryBackend) UpdateSchema(ctx context.Context, input UpdateSchemaInput) (*Schema, error)
- func (b *InMemoryBackend) WaitAPIDestinationRateLimit(ctx context.Context, destARN string, ratePerSecond int)
- type InputTransformer
- type KinesisFirehosePublisher
- type KinesisParameters
- type KinesisStreamPublisher
- type LambdaInvoker
- type ListCodeBindingsInput
- type NetworkConfiguration
- type PartnerEventSource
- type Pipe
- type PlacementConstraint
- type PlacementStrategy
- type Primary
- type Provider
- type PutCodeBindingInput
- type PutEventBusPolicyInput
- type PutPermissionInput
- type PutRuleInput
- type RedshiftDataParameters
- type RemovePermissionInput
- type Replay
- type ReplayDestination
- type ReplicationConfig
- type ResolvedAPIDestination
- type ResolvedOAuth
- type RetryPolicy
- type RoutingConfig
- type Rule
- type RunCommandParameters
- type RunCommandTarget
- type SNSPublisher
- type SQSSender
- type SageMakerPipelineParameter
- type SageMakerPipelineParameters
- type Scheduler
- type Schema
- type SchemaRegistry
- type SchemaVersion
- type Secondary
- type SqsParameters
- type StartReplayInput
- type StepFunctionsExecutor
- type StorageBackend
- type Target
- type UpdateAPIDestinationInput
- type UpdateArchiveInput
- type UpdateConnectionInput
- type UpdateEndpointInput
- type UpdateEventBusInput
- type UpdatePipeInput
- type UpdateRegistryInput
- type UpdateSchemaInput
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnsupportedScheduleExpression = errors.New("unsupported schedule expression") ErrInvalidRateExpression = errors.New("invalid rate expression") ErrInvalidRateValue = errors.New("invalid rate value") ErrUnsupportedRateUnit = errors.New("unsupported rate unit") ErrInvalidCronExpression = errors.New("invalid cron expression") )
Sentinel errors for schedule expression parsing.
var ( ErrEventBusNotFound = errors.New("ResourceNotFoundException") ErrEventBusAlreadyExists = errors.New("ResourceAlreadyExistsException") ErrRuleNotFound = errors.New("ResourceNotFoundException") ErrCannotDeleteDefaultBus = errors.New("IllegalArgumentException") ErrInvalidParameter = errors.New("InvalidParameterException") ErrNotFound = errors.New("ResourceNotFoundException") ErrAlreadyExists = errors.New("ResourceAlreadyExistsException") ErrInvalidState = errors.New("InvalidStateException") ErrResourceLimitExceeded = errors.New("ResourceLimitExceededException") // ErrForbiddenOperation is returned when an operation is forbidden (e.g., modifying built-in registries). ErrForbiddenOperation = errors.New("ForbiddenException") )
var ErrNilAppContext = errors.New("nil AppContext passed to EventBridge provider Init")
ErrNilAppContext is returned by Init when called with a nil AppContext.
Functions ¶
This section is empty.
Types ¶
type APIDestination ¶
type APIDestination struct {
CreationTime time.Time `json:"CreationTime"`
LastModifiedTime time.Time `json:"LastModifiedTime"`
APIDestinationArn string `json:"ApiDestinationArn"`
APIDestinationState string `json:"ApiDestinationState"`
ConnectionArn string `json:"ConnectionArn"`
Description string `json:"Description,omitempty"`
HTTPMethod string `json:"HttpMethod"`
InvocationEndpoint string `json:"InvocationEndpoint"`
Name string `json:"Name"`
InvocationRateLimitPerSecond int `json:"InvocationRateLimitPerSecond,omitempty"`
}
APIDestination represents an EventBridge API destination.
type APIDestinationResolver ¶
type APIDestinationResolver interface {
// ResolveAPIDestination returns the resolved destination, or false if the
// ARN does not identify a known API destination.
ResolveAPIDestination(destARN string) (*ResolvedAPIDestination, bool)
// WaitAPIDestinationRateLimit blocks until the destination's configured
// rate permits another request, or ctx is done. A non-positive rate is
// unlimited.
WaitAPIDestinationRateLimit(ctx context.Context, destARN string, ratePerSecond int)
}
APIDestinationResolver resolves an API-destination ARN to its concrete invocation config plus the connection credentials used to authenticate the outbound request, and throttles delivery to the destination's configured rate. It is implemented by the backend and consulted at delivery time.
type AppSyncParameters ¶
type AppSyncParameters struct {
GraphQLOperation string `json:"GraphQLOperation,omitempty"`
}
AppSyncParameters holds the GraphQL operation to invoke when the target is an AppSync API.
type Archive ¶
type Archive struct {
CreationTime time.Time `json:"CreationTime"`
ArchiveName string `json:"ArchiveName"`
ArchiveArn string `json:"ArchiveArn"`
Description string `json:"Description,omitempty"`
EventPattern string `json:"EventPattern,omitempty"`
EventSourceArn string `json:"EventSourceArn"`
State string `json:"State"`
StateReason string `json:"StateReason,omitempty"`
EventCount int64 `json:"EventCount"`
RetentionDays int `json:"RetentionDays,omitempty"`
SizeBytes int64 `json:"SizeBytes"`
}
Archive represents an EventBridge archive.
type ArchiveJanitor ¶
type ArchiveJanitor struct {
Backend *InMemoryBackend
Interval time.Duration
// contains filtered or unexported fields
}
ArchiveJanitor removes expired archives based on RetentionDays.
func NewArchiveJanitor ¶
func NewArchiveJanitor(backend *InMemoryBackend, interval time.Duration) *ArchiveJanitor
NewArchiveJanitor creates an archive janitor for EventBridge.
func (*ArchiveJanitor) Run ¶
func (j *ArchiveJanitor) Run(ctx context.Context)
Run executes the janitor loop until ctx is cancelled.
func (*ArchiveJanitor) SweepOnce ¶
func (j *ArchiveJanitor) SweepOnce(ctx context.Context)
SweepOnce executes one archive cleanup pass.
type AwsVpcConfiguration ¶
type AwsVpcConfiguration struct {
AssignPublicIP string `json:"AssignPublicIp,omitempty"`
Subnets []string `json:"Subnets"`
SecurityGroups []string `json:"SecurityGroups,omitempty"`
}
AwsVpcConfiguration specifies the subnets, security groups, and public-IP assignment for an ECS target task using the awsvpc network mode.
type BatchArrayProperties ¶
type BatchArrayProperties struct {
Size int `json:"Size,omitempty"`
}
BatchArrayProperties defines the size of the array for a batch job.
type BatchParameters ¶
type BatchParameters struct {
ArrayProperties *BatchArrayProperties `json:"ArrayProperties,omitempty"`
JobDefinition string `json:"JobDefinition,omitempty"`
JobName string `json:"JobName,omitempty"`
}
BatchParameters holds batching configuration for a target (e.g. SQS).
type CapacityProviderStrategyItem ¶
type CapacityProviderStrategyItem struct {
CapacityProvider string `json:"CapacityProvider"`
Base int32 `json:"Base,omitempty"`
Weight int32 `json:"Weight,omitempty"`
}
CapacityProviderStrategyItem is a single entry in an ECS target's capacity provider strategy.
type CloudWatchLogsPublisher ¶
type CloudWatchLogsPublisher interface {
PutLogEvents(ctx context.Context, logGroupName, logStreamName string, logEvents []any) error
}
CloudWatchLogsPublisher delivers an event to a CloudWatch Logs log group.
type CodeBinding ¶
type CodeBinding struct {
CreationDate time.Time `json:"CreationDate"`
LastModified time.Time `json:"LastModified"`
Language string `json:"Language"`
SchemaVersion string `json:"SchemaVersion"`
Status string `json:"Status"` // CREATE_COMPLETE, CREATE_IN_PROGRESS, CREATE_FAILED
}
CodeBinding represents a generated code binding for a schema.
type Connection ¶
type Connection struct {
AuthParameters *ConnectionAuthParameters `json:"AuthParameters,omitempty"`
ConnectionArn string `json:"ConnectionArn"`
AuthorizationType string `json:"AuthorizationType"`
ConnectionState string `json:"ConnectionState"`
CreationTime time.Time `json:"CreationTime"`
Description string `json:"Description,omitempty"`
LastAuthorizedTime time.Time `json:"LastAuthorizedTime,omitzero"`
LastModifiedTime time.Time `json:"LastModifiedTime"`
Name string `json:"Name"`
SecretArn string `json:"SecretArn,omitempty"`
StateReason string `json:"StateReason,omitempty"`
// contains filtered or unexported fields
}
Connection represents an EventBridge connection.
type ConnectionAPIKeyAuthParameters ¶
type ConnectionAPIKeyAuthParameters struct {
APIKeyName string `json:"ApiKeyName"`
APIKeyValue string `json:"ApiKeyValue,omitempty"`
}
ConnectionAPIKeyAuthParameters holds API key auth credentials.
type ConnectionAuthParameters ¶
type ConnectionAuthParameters struct {
BasicAuthParameters *ConnectionBasicAuthParameters `json:"BasicAuthParameters,omitempty"`
APIKeyAuthParameters *ConnectionAPIKeyAuthParameters `json:"ApiKeyAuthParameters,omitempty"`
OAuthParameters *ConnectionOAuthParameters `json:"OAuthParameters,omitempty"`
InvocationHTTPParameters *ConnectionHTTPParameters `json:"InvocationHttpParameters,omitempty"`
}
ConnectionAuthParameters holds the auth credentials for a connection.
type ConnectionBasicAuthParameters ¶
type ConnectionBasicAuthParameters struct {
Username string `json:"Username"`
Password string `json:"Password,omitempty"`
}
ConnectionBasicAuthParameters holds Basic auth credentials.
type ConnectionBodyParameter ¶
type ConnectionBodyParameter struct {
Key string `json:"Key"`
Value string `json:"Value,omitempty"`
IsValueSecret bool `json:"IsValueSecret,omitempty"`
}
ConnectionBodyParameter holds a single body parameter key/value pair.
type ConnectionHTTPParameters ¶
type ConnectionHTTPParameters struct {
BodyParameters []ConnectionBodyParameter `json:"BodyParameters,omitempty"`
HeaderParameters []ConnectionHeaderParameter `json:"HeaderParameters,omitempty"`
QueryStringParameters []ConnectionQueryStringParameter `json:"QueryStringParameters,omitempty"`
}
ConnectionHTTPParameters holds custom HTTP body/header/query-string parameters.
type ConnectionHeaderParameter ¶
type ConnectionHeaderParameter struct {
Key string `json:"Key"`
Value string `json:"Value,omitempty"`
IsValueSecret bool `json:"IsValueSecret,omitempty"`
}
ConnectionHeaderParameter holds a single header key/value pair.
type ConnectionOAuthClientParameters ¶
type ConnectionOAuthClientParameters struct {
ClientID string `json:"ClientID"`
ClientSecret string `json:"ClientSecret,omitempty"`
}
ConnectionOAuthClientParameters holds OAuth client ID and secret.
type ConnectionOAuthParameters ¶
type ConnectionOAuthParameters struct {
ClientParameters *ConnectionOAuthClientParameters `json:"ClientParameters,omitempty"`
OAuthHTTPParameters *ConnectionHTTPParameters `json:"OAuthHttpParameters,omitempty"`
AuthorizationEndpoint string `json:"AuthorizationEndpoint"`
HTTPMethod string `json:"HttpMethod"`
}
ConnectionOAuthParameters holds OAuth credentials.
type ConnectionQueryStringParameter ¶
type ConnectionQueryStringParameter struct {
Key string `json:"Key"`
Value string `json:"Value,omitempty"`
IsValueSecret bool `json:"IsValueSecret,omitempty"`
}
ConnectionQueryStringParameter holds a single query-string key/value pair.
type CreateAPIDestinationInput ¶
type CreateAPIDestinationInput struct {
ConnectionArn string `json:"ConnectionArn"`
Description string `json:"Description,omitempty"`
HTTPMethod string `json:"HttpMethod"`
InvocationEndpoint string `json:"InvocationEndpoint"`
Name string `json:"Name"`
InvocationRateLimitPerSecond int `json:"InvocationRateLimitPerSecond,omitempty"`
}
CreateAPIDestinationInput is the input for CreateAPIDestination.
type CreateArchiveInput ¶
type CreateArchiveInput struct {
ArchiveName string `json:"ArchiveName"`
Description string `json:"Description,omitempty"`
EventPattern string `json:"EventPattern,omitempty"`
EventSourceArn string `json:"EventSourceArn"`
RetentionDays int `json:"RetentionDays,omitempty"`
}
CreateArchiveInput is the input for CreateArchive.
type CreateConnectionInput ¶
type CreateConnectionInput struct {
AuthorizationType string `json:"AuthorizationType"`
AuthParameters *ConnectionAuthParameters `json:"AuthParameters,omitempty"`
Description string `json:"Description,omitempty"`
Name string `json:"Name"`
}
CreateConnectionInput is the input for CreateConnection.
type CreateEndpointInput ¶
type CreateEndpointInput struct {
ReplicationConfig *ReplicationConfig `json:"ReplicationConfig,omitempty"`
RoutingConfig *RoutingConfig `json:"RoutingConfig,omitempty"`
Description string `json:"Description,omitempty"`
Name string `json:"Name"`
RoleArn string `json:"RoleArn,omitempty"`
EventBuses []EndpointEventBus `json:"EventBuses"`
}
CreateEndpointInput is the input for CreateEndpoint.
type CreatePipeInput ¶
type CreatePipeInput struct {
Description string `json:"Description,omitempty"`
DesiredState string `json:"DesiredState,omitempty"`
EnrichmentArn string `json:"EnrichmentArn,omitempty"`
Name string `json:"Name"`
RoleArn string `json:"RoleArn"`
SourceArn string `json:"SourceArn"`
TargetArn string `json:"TargetArn"`
}
CreatePipeInput is the input for CreatePipe.
type CreateRegistryInput ¶
type CreateRegistryInput struct {
Tags map[string]string `json:"Tags,omitempty"`
RegistryName string `json:"RegistryName"`
Description string `json:"Description,omitempty"`
}
CreateRegistryInput is the input for CreateRegistry.
type CreateSchemaInput ¶
type CreateSchemaInput struct {
Tags map[string]string `json:"Tags,omitempty"`
RegistryName string `json:"RegistryName"`
SchemaName string `json:"SchemaName"`
Type string `json:"Type"`
Content string `json:"Content"`
Description string `json:"Description,omitempty"`
}
CreateSchemaInput is the input for CreateSchema.
type DeadLetterConfig ¶
type DeadLetterConfig struct {
Arn string `json:"Arn,omitempty"`
}
DeadLetterConfig holds the dead-letter queue configuration for a target.
type DeliveryTargets ¶
type DeliveryTargets struct {
Lambda LambdaInvoker
SQS SQSSender
SNS SNSPublisher
KinesisFirehose KinesisFirehosePublisher
KinesisStream KinesisStreamPublisher
ECS ECSTaskRunner
StepFunctions StepFunctionsExecutor
CloudWatchLogs CloudWatchLogsPublisher
APIDestinations APIDestinationResolver
}
DeliveryTargets holds optional service references for event fan-out.
type DescribeCodeBindingInput ¶
type DescribeCodeBindingInput struct {
RegistryName string `json:"RegistryName"`
SchemaName string `json:"SchemaName"`
Language string `json:"Language"`
SchemaVersion string `json:"SchemaVersion,omitempty"`
}
DescribeCodeBindingInput is the input for DescribeCodeBinding.
type ECSTaskRunner ¶
type ECSTaskRunner interface {
RunTask(ctx context.Context, clusterARN string, payload []byte) error
}
ECSTaskRunner can run an ECS task.
type EcsParameters ¶
type EcsParameters struct {
NetworkConfiguration *NetworkConfiguration `json:"NetworkConfiguration,omitempty"`
PropagateTags string `json:"PropagateTags,omitempty"`
TaskDefinitionArn string `json:"TaskDefinitionArn"`
Group string `json:"Group,omitempty"`
LaunchType string `json:"LaunchType,omitempty"`
PlatformVersion string `json:"PlatformVersion,omitempty"`
ReferenceID string `json:"ReferenceId,omitempty"`
PlacementConstraints []PlacementConstraint `json:"PlacementConstraints,omitempty"`
PlacementStrategy []PlacementStrategy `json:"PlacementStrategy,omitempty"`
Tags []EcsTag `json:"Tags,omitempty"`
CapacityProviderStrategy []CapacityProviderStrategyItem `json:"CapacityProviderStrategy,omitempty"`
EnableECSManagedTags bool `json:"EnableECSManagedTags,omitempty"`
EnableExecuteCommand bool `json:"EnableExecuteCommand,omitempty"`
}
EcsParameters holds the parameters used to run an Amazon ECS task when the event target is an ECS cluster.
type EcsTag ¶
EcsTag is a key/value tag applied to an ECS target task (distinct from the EventBridge resource-tag maps used by tags.go, which model bus/rule/etc. tagging, not the per-task tags forwarded to ECS RunTask).
type Endpoint ¶
type Endpoint struct {
CreationTime time.Time `json:"CreationTime"`
LastModifiedTime time.Time `json:"LastModifiedTime"`
ReplicationConfig *ReplicationConfig `json:"ReplicationConfig,omitempty"`
RoutingConfig *RoutingConfig `json:"RoutingConfig,omitempty"`
RoleArn string `json:"RoleArn,omitempty"`
EndpointURL string `json:"EndpointUrl"`
Name string `json:"Name"`
EndpointID string `json:"EndpointId"`
Description string `json:"Description,omitempty"`
Arn string `json:"Arn"`
State string `json:"State"`
StateReason string `json:"StateReason,omitempty"`
EventBuses []EndpointEventBus `json:"EventBuses,omitempty"`
}
Endpoint represents an EventBridge global endpoint.
type EndpointEventBus ¶
type EndpointEventBus struct {
EventBusArn string `json:"EventBusArn"`
}
EndpointEventBus associates an event bus with an endpoint.
type EventBus ¶
type EventBus struct {
CreatedTime time.Time `json:"CreatedTime"`
Name string `json:"Name"`
Arn string `json:"Arn"`
Description string `json:"Description,omitempty"`
}
EventBus represents an EventBridge event bus.
type EventBusPolicy ¶
type EventBusPolicy struct {
Statements map[string]*EventBusPolicyStatement
}
EventBusPolicy is the resource-based policy attached to an event bus.
type EventBusPolicyStatement ¶
type EventBusPolicyStatement struct {
Action string `json:"Action"`
Effect string `json:"Effect"`
Principal any `json:"Principal"`
Sid string `json:"Sid"`
}
EventBusPolicyStatement is a single statement in an event bus resource policy.
type EventEntry ¶
type EventEntry struct {
Time *time.Time `json:"Time,omitempty"`
Source string `json:"Source"`
DetailType string `json:"DetailType"`
Detail string `json:"Detail"`
EventBusName string `json:"EventBusName,omitempty"`
Resources []string `json:"Resources,omitempty"`
}
EventEntry represents a single event to publish.
type EventLogEntry ¶
type EventLogEntry struct {
Time time.Time `json:"time"`
ID string `json:"id"`
Source string `json:"source"`
DetailType string `json:"detailType"`
Detail string `json:"detail"`
EventBusName string `json:"eventBusName"`
}
EventLogEntry is an entry in the internal event log.
type EventResultEntry ¶
type EventResultEntry struct {
EventID string `json:"EventId,omitempty"`
ErrorCode string `json:"ErrorCode,omitempty"`
ErrorMessage string `json:"ErrorMessage,omitempty"`
}
EventResultEntry is returned per event in a PutEvents response.
type EventSource ¶
type EventSource struct {
Arn string `json:"Arn"`
CreatedBy string `json:"CreatedBy"`
CreationTime time.Time `json:"CreationTime"`
ExpirationTime time.Time `json:"ExpirationTime,omitzero"`
Name string `json:"Name"`
State string `json:"State"` // PENDING, ACTIVE, DELETED
}
EventSource represents a partner event source.
type FailedEntry ¶
type FailedEntry struct {
TargetID string `json:"TargetId,omitempty"`
ErrorCode string `json:"ErrorCode"`
ErrorMessage string `json:"ErrorMessage"`
}
FailedEntry describes a target or event that failed to process.
type FailoverConfig ¶
type FailoverConfig struct {
Primary *Primary `json:"Primary"`
Secondary *Secondary `json:"Secondary"`
}
FailoverConfig defines failover settings.
type GetDiscoveredSchemaInput ¶
GetDiscoveredSchemaInput is the input for GetDiscoveredSchema.
type GetEventBusPolicyInput ¶
type GetEventBusPolicyInput struct {
EventBusName string `json:"EventBusName,omitempty"`
}
GetEventBusPolicyInput is the input for GetEventBusPolicy.
type HTTPParameters ¶
type HTTPParameters struct {
HeaderParameters map[string]string `json:"HeaderParameters,omitempty"`
QueryStringParameters map[string]string `json:"QueryStringParameters,omitempty"`
PathParameterValues []string `json:"PathParameterValues,omitempty"`
}
HTTPParameters holds the headers, path parameters, and query-string values to add when the target is an API Gateway API or EventBridge ApiDestination.
type Handler ¶
type Handler struct {
Backend StorageBackend
DefaultRegion string
// contains filtered or unexported fields
}
Handler is the Echo HTTP service handler for EventBridge operations.
func NewHandler ¶
func NewHandler(backend StorageBackend) *Handler
NewHandler creates a new EventBridge handler.
func (*Handler) ChaosOperations ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this EventBridge instance handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the operation name from the X-Amz-Target header.
func (*Handler) ExtractResource ¶
ExtractResource extracts the resource name from the request body.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns all mocked EventBridge operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function for EventBridge requests.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority for the EventBridge handler.
func (*Handler) Reset ¶
func (h *Handler) Reset()
Reset clears all in-memory state from the backend. It is used by the POST /_gopherstack/reset endpoint for CI pipelines and rapid local development.
func (*Handler) Restore ¶
Restore implements persistence.Persistable by restoring both the backend state and the handler-owned tag data.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a matcher for EventBridge requests.
func (*Handler) SetArchiveJanitor ¶
func (h *Handler) SetArchiveJanitor(j *ArchiveJanitor)
SetArchiveJanitor attaches an archive janitor to the handler.
func (*Handler) SetScheduler ¶
SetScheduler attaches a Scheduler to the handler. The scheduler is started as a background worker when StartWorker is called (which satisfies service.BackgroundWorker).
func (*Handler) Shutdown ¶
Shutdown implements service.Shutdowner. It cancels the scheduler and archive janitor goroutines, then cancels the backend's internal lifecycle context and waits for all in-flight delivery goroutines to finish. If ctx expires before Close returns, Shutdown returns immediately so the process shutdown is not blocked.
func (*Handler) Snapshot ¶
Snapshot implements persistence.Persistable by serialising both the backend state and the handler-owned tag data.
func (*Handler) StartWorker ¶
StartWorker implements service.BackgroundWorker. It starts the EventBridge scheduled-rules scheduler and archive janitor as background goroutines. A derived context is stored so Shutdown can cancel both goroutines independently of the backend lifecycle.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend implements StorageBackend using in-memory maps.
func NewInMemoryBackend ¶
func NewInMemoryBackend() *InMemoryBackend
NewInMemoryBackend creates a new InMemoryBackend with default configuration.
func NewInMemoryBackendWithConfig ¶
func NewInMemoryBackendWithConfig(accountID, region string) *InMemoryBackend
NewInMemoryBackendWithConfig creates a new InMemoryBackend with given account and region. The backend's lifecycle context is derived from context.Background; use NewInMemoryBackendWithContext to bind it to a parent service context instead.
func NewInMemoryBackendWithContext ¶
func NewInMemoryBackendWithContext( svcCtx context.Context, accountID, region string, ) *InMemoryBackend
NewInMemoryBackendWithContext creates a new InMemoryBackend whose lifecycle context is derived from the provided parent. When the parent is cancelled (e.g. on server shutdown), all in-flight delivery workers are also cancelled. If svcCtx is nil, context.Background is used.
func (*InMemoryBackend) ActivateEventSource ¶
func (b *InMemoryBackend) ActivateEventSource(ctx context.Context, name string) error
ActivateEventSource activates a partner event source.
func (*InMemoryBackend) AddAPIDestinationInternal ¶
func (b *InMemoryBackend) AddAPIDestinationInternal(dst *APIDestination)
AddAPIDestinationInternal adds an API destination directly for testing.
func (*InMemoryBackend) AddArchiveInternal ¶
func (b *InMemoryBackend) AddArchiveInternal(archive *Archive)
AddArchiveInternal adds an archive directly for testing.
func (*InMemoryBackend) AddConnectionInternal ¶
func (b *InMemoryBackend) AddConnectionInternal(conn *Connection)
AddConnectionInternal adds a connection directly for testing.
func (*InMemoryBackend) AddEndpointInternal ¶
func (b *InMemoryBackend) AddEndpointInternal(ep *Endpoint)
AddEndpointInternal adds an endpoint directly for testing.
func (*InMemoryBackend) AddEventSourceInternal ¶
func (b *InMemoryBackend) AddEventSourceInternal(src *EventSource)
AddEventSourceInternal adds an event source directly for testing.
func (*InMemoryBackend) AddPartnerSourceInternal ¶
func (b *InMemoryBackend) AddPartnerSourceInternal(src *PartnerEventSource)
AddPartnerSourceInternal adds a partner event source directly for testing.
func (*InMemoryBackend) AddReplayInternal ¶
func (b *InMemoryBackend) AddReplayInternal(replay *Replay)
AddReplayInternal adds a replay directly for testing.
func (*InMemoryBackend) CancelReplay ¶
CancelReplay cancels a running or starting replay.
func (*InMemoryBackend) Close ¶
func (b *InMemoryBackend) Close()
Close marks the backend as closing, cancels the lifecycle context, and waits for all in-flight delivery goroutines to finish. It returns after at most shutdownTimeout to prevent a hung target service from blocking service shutdown indefinitely. Once Close is called, PutEvents will no longer spawn new delivery goroutines. The internal wg.Wait goroutine completes on its own once all delivery goroutines exit — either because the lifecycle context was cancelled (propagated to each delivery) or because the per-delivery deadline fired.
func (*InMemoryBackend) CreateAPIDestination ¶
func (b *InMemoryBackend) CreateAPIDestination(ctx context.Context, input CreateAPIDestinationInput, ) (*APIDestination, error)
CreateAPIDestination creates a new API destination.
func (*InMemoryBackend) CreateArchive ¶
func (b *InMemoryBackend) CreateArchive(ctx context.Context, input CreateArchiveInput) (*Archive, error)
CreateArchive creates a new event archive.
func (*InMemoryBackend) CreateConnection ¶
func (b *InMemoryBackend) CreateConnection(ctx context.Context, input CreateConnectionInput) (*Connection, error)
CreateConnection creates a new connection.
func (*InMemoryBackend) CreateEndpoint ¶
func (b *InMemoryBackend) CreateEndpoint(ctx context.Context, input CreateEndpointInput) (*Endpoint, error)
CreateEndpoint creates a new global endpoint.
func (*InMemoryBackend) CreateEventBus ¶
func (b *InMemoryBackend) CreateEventBus(ctx context.Context, name, description string) (*EventBus, error)
CreateEventBus creates a new event bus.
func (*InMemoryBackend) CreatePartnerEventSource ¶
func (b *InMemoryBackend) CreatePartnerEventSource(ctx context.Context, name, account string, ) (*PartnerEventSource, error)
CreatePartnerEventSource creates a new partner event source.
func (*InMemoryBackend) CreatePipe ¶
func (b *InMemoryBackend) CreatePipe( ctx context.Context, input CreatePipeInput, ) (*Pipe, error)
CreatePipe creates a new EventBridge Pipe.
func (*InMemoryBackend) CreateRegistry ¶
func (b *InMemoryBackend) CreateRegistry( ctx context.Context, input CreateRegistryInput, ) (*SchemaRegistry, error)
CreateRegistry creates a new schema registry.
func (*InMemoryBackend) CreateSchema ¶
func (b *InMemoryBackend) CreateSchema( ctx context.Context, input CreateSchemaInput, ) (*Schema, error)
CreateSchema creates a new schema (version "1") within a registry.
func (*InMemoryBackend) DeactivateEventSource ¶
func (b *InMemoryBackend) DeactivateEventSource(ctx context.Context, name string) error
DeactivateEventSource deactivates a partner event source.
func (*InMemoryBackend) DeauthorizeConnection ¶
func (b *InMemoryBackend) DeauthorizeConnection(ctx context.Context, name string) (*Connection, error)
DeauthorizeConnection deauthorizes a connection.
func (*InMemoryBackend) DeleteAPIDestination ¶
func (b *InMemoryBackend) DeleteAPIDestination(ctx context.Context, name string) error
DeleteAPIDestination deletes an API destination.
func (*InMemoryBackend) DeleteArchive ¶
func (b *InMemoryBackend) DeleteArchive(ctx context.Context, name string) error
DeleteArchive deletes an archive.
func (*InMemoryBackend) DeleteConnection ¶
func (b *InMemoryBackend) DeleteConnection(ctx context.Context, name string) error
DeleteConnection deletes a connection.
func (*InMemoryBackend) DeleteEndpoint ¶
func (b *InMemoryBackend) DeleteEndpoint(ctx context.Context, name string) error
DeleteEndpoint deletes an endpoint.
func (*InMemoryBackend) DeleteEventBus ¶
func (b *InMemoryBackend) DeleteEventBus(ctx context.Context, name string) error
DeleteEventBus deletes an event bus by name (default bus cannot be deleted). It also removes all rules and targets associated with the bus.
func (*InMemoryBackend) DeletePartnerEventSource ¶
func (b *InMemoryBackend) DeletePartnerEventSource(ctx context.Context, name string) error
DeletePartnerEventSource deletes a partner event source.
func (*InMemoryBackend) DeletePipe ¶
func (b *InMemoryBackend) DeletePipe(ctx context.Context, name string) error
DeletePipe removes an EventBridge Pipe.
func (*InMemoryBackend) DeleteRegistry ¶
func (b *InMemoryBackend) DeleteRegistry( ctx context.Context, registryName string, ) error
DeleteRegistry deletes a registry and all its schemas and versions.
func (*InMemoryBackend) DeleteRule ¶
func (b *InMemoryBackend) DeleteRule(ctx context.Context, name, eventBusName string) error
DeleteRule removes a rule from an event bus.
func (*InMemoryBackend) DeleteSchema ¶
func (b *InMemoryBackend) DeleteSchema( ctx context.Context, registryName, schemaName string, ) error
DeleteSchema deletes a schema and all its versions.
func (*InMemoryBackend) DeleteSchemaVersion ¶
func (b *InMemoryBackend) DeleteSchemaVersion(ctx context.Context, registryName, schemaName, schemaVersion string, ) error
DeleteSchemaVersion deletes a specific version of a schema. AWS rejects deletion of the last remaining version (BadRequestException).
func (*InMemoryBackend) DescribeAPIDestination ¶
func (b *InMemoryBackend) DescribeAPIDestination(ctx context.Context, name string) (*APIDestination, error)
DescribeAPIDestination returns a single API destination by name.
func (*InMemoryBackend) DescribeArchive ¶
DescribeArchive returns a single archive by name.
func (*InMemoryBackend) DescribeCodeBinding ¶
func (b *InMemoryBackend) DescribeCodeBinding(ctx context.Context, input DescribeCodeBindingInput, ) (*CodeBinding, error)
DescribeCodeBinding returns the status of a code binding.
func (*InMemoryBackend) DescribeConnection ¶
func (b *InMemoryBackend) DescribeConnection(ctx context.Context, name string) (*Connection, error)
DescribeConnection returns a single connection by name.
func (*InMemoryBackend) DescribeEndpoint ¶
DescribeEndpoint returns a single endpoint by name.
func (*InMemoryBackend) DescribeEventBus ¶
DescribeEventBus returns details for a single event bus.
func (*InMemoryBackend) DescribeEventSource ¶
func (b *InMemoryBackend) DescribeEventSource(ctx context.Context, name string) (*EventSource, error)
DescribeEventSource returns a single event source by name.
func (*InMemoryBackend) DescribePartnerEventSource ¶
func (b *InMemoryBackend) DescribePartnerEventSource(ctx context.Context, name string) (*PartnerEventSource, error)
DescribePartnerEventSource returns a single partner event source by name.
func (*InMemoryBackend) DescribePipe ¶
DescribePipe returns a single EventBridge Pipe by name.
func (*InMemoryBackend) DescribeRegistry ¶
func (b *InMemoryBackend) DescribeRegistry( ctx context.Context, registryName string, ) (*SchemaRegistry, error)
DescribeRegistry returns a single schema registry.
func (*InMemoryBackend) DescribeReplay ¶
DescribeReplay returns a single replay by name.
func (*InMemoryBackend) DescribeRule ¶
func (b *InMemoryBackend) DescribeRule(ctx context.Context, name, eventBusName string) (*Rule, error)
DescribeRule returns a single rule.
func (*InMemoryBackend) DescribeSchema ¶
func (b *InMemoryBackend) DescribeSchema(ctx context.Context, registryName, schemaName, schemaVersion string, ) (*Schema, error)
DescribeSchema returns the current (or requested version of) a schema.
func (*InMemoryBackend) DescribeSchemaVersion ¶
func (b *InMemoryBackend) DescribeSchemaVersion(ctx context.Context, registryName, schemaName, schemaVersion string, ) (*SchemaVersion, error)
DescribeSchemaVersion returns a specific schema version.
func (*InMemoryBackend) DisableRule ¶
func (b *InMemoryBackend) DisableRule(ctx context.Context, name, eventBusName string) error
DisableRule sets a rule's state to DISABLED.
func (*InMemoryBackend) EnableRule ¶
func (b *InMemoryBackend) EnableRule(ctx context.Context, name, eventBusName string) error
EnableRule sets a rule's state to ENABLED.
func (*InMemoryBackend) GetCodeBindingSource ¶
func (b *InMemoryBackend) GetCodeBindingSource(ctx context.Context, registryName, schemaName, language, schemaVersion string, ) (string, error)
GetCodeBindingSource returns placeholder source code for a generated code binding. Real source generation is out of scope for in-process emulation.
func (*InMemoryBackend) GetDiscoveredSchema ¶
func (b *InMemoryBackend) GetDiscoveredSchema( ctx context.Context, input GetDiscoveredSchemaInput, ) (string, error)
GetDiscoveredSchema generates a schema skeleton from one or more event JSON strings. Returns a minimal OpenApi3 schema template (real schema inference is out of scope).
func (*InMemoryBackend) GetEventBusPolicy ¶
func (b *InMemoryBackend) GetEventBusPolicy(ctx context.Context, eventBusName string) (string, error)
GetEventBusPolicy returns the resource-based policy for an event bus as JSON.
func (*InMemoryBackend) GetEventLog ¶
func (b *InMemoryBackend) GetEventLog(ctx context.Context) []EventLogEntry
GetEventLog returns a copy of the current event log.
func (*InMemoryBackend) ListAPIDestinations ¶
func (b *InMemoryBackend) ListAPIDestinations(ctx context.Context, namePrefix, nextToken string, ) ([]APIDestination, string, error)
ListAPIDestinations returns API destinations optionally filtered by name prefix, with pagination.
func (*InMemoryBackend) ListArchives ¶
func (b *InMemoryBackend) ListArchives(ctx context.Context, namePrefix, nextToken string) ([]Archive, string, error)
ListArchives returns archives optionally filtered by name prefix, with pagination.
func (*InMemoryBackend) ListCodeBindings ¶
func (b *InMemoryBackend) ListCodeBindings(ctx context.Context, input ListCodeBindingsInput, ) ([]CodeBinding, string, error)
ListCodeBindings returns all code bindings for a given schema (optionally filtered by version).
func (*InMemoryBackend) ListConnections ¶
func (b *InMemoryBackend) ListConnections(ctx context.Context, namePrefix, nextToken string, ) ([]Connection, string, error)
ListConnections returns connections optionally filtered by name prefix, with pagination.
func (*InMemoryBackend) ListEndpoints ¶
func (b *InMemoryBackend) ListEndpoints(ctx context.Context, namePrefix, nextToken string) ([]Endpoint, string, error)
ListEndpoints returns endpoints optionally filtered by name prefix, with pagination.
func (*InMemoryBackend) ListEventBuses ¶
func (b *InMemoryBackend) ListEventBuses( ctx context.Context, namePrefix, nextToken string, limit int, ) ([]EventBus, string, error)
ListEventBuses returns event buses optionally filtered by name prefix, with pagination. limit controls the page size; 0 uses the backend default (100).
func (*InMemoryBackend) ListEventSources ¶
func (b *InMemoryBackend) ListEventSources(ctx context.Context, namePrefix, nextToken string, ) ([]EventSource, string, error)
ListEventSources returns event sources optionally filtered by name prefix, with pagination.
func (*InMemoryBackend) ListPartnerEventSources ¶
func (b *InMemoryBackend) ListPartnerEventSources(ctx context.Context, namePrefix, nextToken string, ) ([]PartnerEventSource, string, error)
ListPartnerEventSources returns partner event sources optionally filtered by name prefix.
func (*InMemoryBackend) ListPipes ¶
func (b *InMemoryBackend) ListPipes( ctx context.Context, namePrefix, nextToken string, ) ([]Pipe, string, error)
ListPipes returns EventBridge Pipes optionally filtered by name prefix, with pagination.
func (*InMemoryBackend) ListRegistries ¶
func (b *InMemoryBackend) ListRegistries(ctx context.Context, namePrefix, nextToken string, ) ([]SchemaRegistry, string, error)
ListRegistries returns schema registries optionally filtered by name prefix.
func (*InMemoryBackend) ListReplays ¶
func (b *InMemoryBackend) ListReplays(ctx context.Context, namePrefix, nextToken string) ([]Replay, string, error)
ListReplays returns replays optionally filtered by name prefix, with pagination.
func (*InMemoryBackend) ListRuleNamesByTarget ¶
func (b *InMemoryBackend) ListRuleNamesByTarget(ctx context.Context, targetARN, eventBusName, nextToken string, ) ([]string, string, error)
ListRuleNamesByTarget returns rule names that have a target matching the given ARN.
func (*InMemoryBackend) ListRules ¶
func (b *InMemoryBackend) ListRules(ctx context.Context, eventBusName, namePrefix, nextToken string, limit int, ) ([]Rule, string, error)
ListRules returns rules for an event bus optionally filtered by name prefix. limit caps the page size (0 uses the default); AWS EventBridge honours the Limit request parameter, so it is threaded through to pagination here.
func (*InMemoryBackend) ListSchemaVersions ¶
func (b *InMemoryBackend) ListSchemaVersions(ctx context.Context, registryName, schemaName, nextToken string, ) ([]SchemaVersion, string, error)
ListSchemaVersions returns all versions of a schema.
func (*InMemoryBackend) ListSchemas ¶
func (b *InMemoryBackend) ListSchemas(ctx context.Context, registryName, namePrefix, nextToken string, ) ([]Schema, string, error)
ListSchemas returns schemas in a registry optionally filtered by name prefix.
func (*InMemoryBackend) ListTargetsByRule ¶
func (b *InMemoryBackend) ListTargetsByRule(ctx context.Context, ruleName, eventBusName, nextToken string, limit int, ) ([]Target, string, error)
ListTargetsByRule returns targets for a rule with optional pagination. limit caps the page size (0 uses the default); AWS EventBridge honours the Limit request parameter, so it is threaded through to pagination here.
func (*InMemoryBackend) PutCodeBinding ¶
func (b *InMemoryBackend) PutCodeBinding( ctx context.Context, input PutCodeBindingInput, ) (*CodeBinding, error)
PutCodeBinding triggers code binding generation for a schema version.
func (*InMemoryBackend) PutEventBusPolicy ¶
func (b *InMemoryBackend) PutEventBusPolicy(ctx context.Context, input PutEventBusPolicyInput) error
PutEventBusPolicy replaces the resource-based policy on an event bus with raw JSON.
func (*InMemoryBackend) PutEvents ¶
func (b *InMemoryBackend) PutEvents(ctx context.Context, entries []EventEntry) ([]EventResultEntry, error)
PutEvents records events in the event log and returns result entries.
AWS EventBridge constrains PutEvents requests to 256 KiB of total entry payload (sum of Source, DetailType, Detail, Resources, Time across every entry). Entries that, combined with what's been accepted so far, would exceed the cap are rejected individually with the AWS error code `EventSizeLimitExceeded`. The remaining entries continue to be accepted.
AWS also requires between 1 and 10 entries per request (a whole-request ValidationException-equivalent otherwise) and requires Source, DetailType, and Detail on every entry (a per-entry InvalidArgument failure, or a whole-request failure if no entry in the batch has all three).
func (*InMemoryBackend) PutPartnerEvents ¶
func (b *InMemoryBackend) PutPartnerEvents(ctx context.Context, entries []EventEntry) ([]EventResultEntry, error)
PutPartnerEvents records partner events (same as PutEvents but intended for partner sources).
func (*InMemoryBackend) PutPermission ¶
func (b *InMemoryBackend) PutPermission(ctx context.Context, input PutPermissionInput) error
PutPermission adds or replaces a resource-based policy statement on an event bus.
func (*InMemoryBackend) PutRule ¶
func (b *InMemoryBackend) PutRule(ctx context.Context, input PutRuleInput) (*Rule, error)
PutRule creates or updates a rule on an event bus.
func (*InMemoryBackend) PutTargets ¶
func (b *InMemoryBackend) PutTargets(ctx context.Context, ruleName, eventBusName string, targets []Target, ) ([]FailedEntry, error)
PutTargets adds or updates targets for a rule.
func (*InMemoryBackend) RemovePermission ¶
func (b *InMemoryBackend) RemovePermission(ctx context.Context, input RemovePermissionInput) error
RemovePermission removes a resource-based policy statement from an event bus.
func (*InMemoryBackend) RemoveTargets ¶
func (b *InMemoryBackend) RemoveTargets(ctx context.Context, ruleName, eventBusName string, ids []string, ) ([]FailedEntry, error)
RemoveTargets removes targets from a rule by their IDs.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset clears all in-memory state from the backend. It is used by the POST /_gopherstack/reset endpoint for CI pipelines and rapid local development.
func (*InMemoryBackend) ResolveAPIDestination ¶
func (b *InMemoryBackend) ResolveAPIDestination(destARN string) (*ResolvedAPIDestination, bool)
ResolveAPIDestination resolves an API-destination ARN to the concrete invocation config plus the (un-masked) connection credentials used to sign the outbound request. It returns false if the destination does not exist. Reads use direct nil-safe map access under the read lock to avoid the lazy-init writes performed by the *Store accessors.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a JSON snapshot. It implements persistence.Persistable. The logger and delivery targets are not restored — they are re-wired by the CLI.
func (*InMemoryBackend) SFNPutEvents ¶
SFNPutEvents implements the Step Functions EventBridge PutEvents service integration. It maps the SFN entries (each a map with Source, DetailType, Detail, EventBusName) to EventEntry values and calls PutEvents, returning the count of failed entries.
func (*InMemoryBackend) SearchSchemas ¶
func (b *InMemoryBackend) SearchSchemas(ctx context.Context, registryName, keywords, nextToken string, ) ([]Schema, string, error)
SearchSchemas searches schemas in a registry by keyword match against schema name or content.
func (*InMemoryBackend) SetDeliveryTargets ¶
func (b *InMemoryBackend) SetDeliveryTargets(dt *DeliveryTargets)
SetDeliveryTargets configures the service references used for fan-out delivery. The backend registers itself as the API-destination resolver (unless the caller supplied one) so outbound HTTP delivery can look up destination and connection state without a separate wiring step.
func (*InMemoryBackend) SetDeliveryTimeout ¶
func (b *InMemoryBackend) SetDeliveryTimeout(d time.Duration)
SetDeliveryTimeout overrides the per-target delivery timeout. Primarily intended for tests.
func (*InMemoryBackend) SetShutdownTimeout ¶
func (b *InMemoryBackend) SetShutdownTimeout(d time.Duration)
SetShutdownTimeout overrides the maximum time Close waits for in-flight goroutines. Primarily intended for tests.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state to JSON. It implements persistence.Persistable.
func (*InMemoryBackend) StartReplay ¶
func (b *InMemoryBackend) StartReplay(ctx context.Context, input StartReplayInput) (*Replay, error)
StartReplay creates a new replay in the STARTING state.
func (*InMemoryBackend) TestEventPattern ¶
func (b *InMemoryBackend) TestEventPattern( ctx context.Context, pattern, event string, ) (bool, error)
TestEventPattern tests an event pattern against an event JSON string.
func (*InMemoryBackend) UpdateAPIDestination ¶
func (b *InMemoryBackend) UpdateAPIDestination(ctx context.Context, input UpdateAPIDestinationInput, ) (*APIDestination, error)
UpdateAPIDestination updates an existing API destination.
func (*InMemoryBackend) UpdateArchive ¶
func (b *InMemoryBackend) UpdateArchive(ctx context.Context, input UpdateArchiveInput) (*Archive, error)
UpdateArchive updates an existing archive.
func (*InMemoryBackend) UpdateConnection ¶
func (b *InMemoryBackend) UpdateConnection(ctx context.Context, input UpdateConnectionInput) (*Connection, error)
UpdateConnection updates an existing connection.
func (*InMemoryBackend) UpdateEndpoint ¶
func (b *InMemoryBackend) UpdateEndpoint(ctx context.Context, input UpdateEndpointInput) (*Endpoint, error)
UpdateEndpoint updates an existing endpoint.
func (*InMemoryBackend) UpdateEventBus ¶
func (b *InMemoryBackend) UpdateEventBus(ctx context.Context, input UpdateEventBusInput) (*EventBus, error)
UpdateEventBus updates an existing event bus description.
func (*InMemoryBackend) UpdatePipe ¶
func (b *InMemoryBackend) UpdatePipe( ctx context.Context, input UpdatePipeInput, ) (*Pipe, error)
UpdatePipe updates an existing EventBridge Pipe.
func (*InMemoryBackend) UpdateRegistry ¶
func (b *InMemoryBackend) UpdateRegistry( ctx context.Context, input UpdateRegistryInput, ) (*SchemaRegistry, error)
UpdateRegistry updates an existing schema registry description.
func (*InMemoryBackend) UpdateSchema ¶
func (b *InMemoryBackend) UpdateSchema( ctx context.Context, input UpdateSchemaInput, ) (*Schema, error)
UpdateSchema creates a new version of an existing schema.
func (*InMemoryBackend) WaitAPIDestinationRateLimit ¶
func (b *InMemoryBackend) WaitAPIDestinationRateLimit( ctx context.Context, destARN string, ratePerSecond int, )
WaitAPIDestinationRateLimit blocks until the destination's configured InvocationRateLimitPerSecond permits another request, or ctx is cancelled. A non-positive rate imposes no limit. Requests are spaced by 1s/rate so a burst of deliveries to the same destination is throttled to the target rate.
type InputTransformer ¶
type InputTransformer struct {
InputPathsMap map[string]string `json:"InputPathsMap,omitempty"`
InputTemplate string `json:"InputTemplate"`
}
InputTransformer holds input transformer configuration for a target.
type KinesisFirehosePublisher ¶
type KinesisFirehosePublisher interface {
PutRecord(ctx context.Context, deliveryStreamARN, data string) error
}
KinesisFirehosePublisher can put records to a Kinesis Data Firehose delivery stream.
type KinesisParameters ¶
type KinesisParameters struct {
PartitionKeyPath string `json:"PartitionKeyPath"`
}
KinesisParameters specifies the partition-key JSON path for a Kinesis Data Stream target.
type KinesisStreamPublisher ¶
type KinesisStreamPublisher interface {
PutRecord(ctx context.Context, streamARN, partitionKey, data string) error
}
KinesisStreamPublisher can put records to a Kinesis Data Stream.
type LambdaInvoker ¶
type LambdaInvoker interface {
InvokeFunction(
ctx context.Context,
name string,
invocationType string,
payload []byte,
) ([]byte, int, error)
}
LambdaInvoker can invoke a Lambda function by name/ARN with a payload.
type ListCodeBindingsInput ¶
type ListCodeBindingsInput struct {
RegistryName string `json:"RegistryName"`
SchemaName string `json:"SchemaName"`
SchemaVersion string `json:"SchemaVersion,omitempty"`
NextToken string `json:"NextToken,omitempty"`
}
ListCodeBindingsInput is the input for ListCodeBindings.
type NetworkConfiguration ¶
type NetworkConfiguration struct {
AwsvpcConfiguration *AwsVpcConfiguration `json:"AwsvpcConfiguration,omitempty"`
}
NetworkConfiguration specifies the awsvpc network configuration for an ECS target task.
type PartnerEventSource ¶
type PartnerEventSource struct {
Arn string `json:"Arn"`
Name string `json:"Name"`
Account string `json:"Account,omitempty"`
}
PartnerEventSource represents a partner event source.
type Pipe ¶
type Pipe struct {
CreationTime time.Time `json:"CreationTime"`
LastModifiedTime time.Time `json:"LastModifiedTime"`
Arn string `json:"Arn"`
CurrentState string `json:"CurrentState"`
Description string `json:"Description,omitempty"`
DesiredState string `json:"DesiredState"`
EnrichmentArn string `json:"EnrichmentArn,omitempty"`
Name string `json:"Name"`
RoleArn string `json:"RoleArn"`
SourceArn string `json:"SourceArn"`
StateReason string `json:"StateReason,omitempty"`
TargetArn string `json:"TargetArn"`
}
Pipe represents an EventBridge Pipe.
type PlacementConstraint ¶
type PlacementConstraint struct {
Expression string `json:"Expression,omitempty"`
Type string `json:"Type,omitempty"`
}
PlacementConstraint is a single ECS task placement constraint.
type PlacementStrategy ¶
type PlacementStrategy struct {
Field string `json:"Field,omitempty"`
Type string `json:"Type,omitempty"`
}
PlacementStrategy is a single ECS task placement strategy rule.
type Primary ¶
type Primary struct {
HealthCheck string `json:"HealthCheck"`
}
Primary defines the primary region health check.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for the EventBridge service.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the EventBridge service backend and handler.
type PutCodeBindingInput ¶
type PutCodeBindingInput struct {
RegistryName string `json:"RegistryName"`
SchemaName string `json:"SchemaName"`
Language string `json:"Language"`
SchemaVersion string `json:"SchemaVersion,omitempty"`
}
PutCodeBindingInput is the input for PutCodeBinding.
type PutEventBusPolicyInput ¶
type PutEventBusPolicyInput struct {
EventBusName string `json:"EventBusName,omitempty"`
Policy string `json:"Policy"`
}
PutEventBusPolicyInput is the input for PutEventBusPolicy (sets raw policy JSON).
type PutPermissionInput ¶
type PutPermissionInput struct {
Policy string `json:"Policy,omitempty"`
Action string `json:"Action,omitempty"`
EventBusName string `json:"EventBusName,omitempty"`
Principal string `json:"Principal,omitempty"`
StatementID string `json:"StatementId,omitempty"`
}
PutPermissionInput is the input for PutPermission.
type PutRuleInput ¶
type PutRuleInput struct {
Tags map[string]string `json:"Tags,omitempty"`
Name string `json:"Name"`
EventBusName string `json:"EventBusName,omitempty"`
EventPattern string `json:"EventPattern,omitempty"`
State string `json:"State,omitempty"`
Description string `json:"Description,omitempty"`
ScheduleExpression string `json:"ScheduleExpression,omitempty"`
RoleArn string `json:"RoleArn,omitempty"`
ManagedBy string `json:"ManagedBy,omitempty"`
}
PutRuleInput is the input for PutRule.
type RedshiftDataParameters ¶
type RedshiftDataParameters struct {
Database string `json:"Database"`
DBUser string `json:"DbUser,omitempty"`
SecretManagerArn string `json:"SecretManagerArn,omitempty"`
SQL string `json:"Sql,omitempty"`
StatementName string `json:"StatementName,omitempty"`
Sqls []string `json:"Sqls,omitempty"`
WithEvent bool `json:"WithEvent,omitempty"`
}
RedshiftDataParameters holds the Redshift Data API ExecuteStatement parameters for an Amazon Redshift cluster target.
type RemovePermissionInput ¶
type RemovePermissionInput struct {
EventBusName string `json:"EventBusName,omitempty"`
StatementID string `json:"StatementId,omitempty"`
RemoveAllPermissions bool `json:"RemoveAllPermissions,omitempty"`
}
RemovePermissionInput is the input for RemovePermission.
type Replay ¶
type Replay struct {
EventStartTime time.Time `json:"EventStartTime,omitzero"`
EventEndTime time.Time `json:"EventEndTime,omitzero"`
ReplayStartTime time.Time `json:"ReplayStartTime,omitzero"`
ReplayEndTime time.Time `json:"ReplayEndTime,omitzero"`
ReplayName string `json:"ReplayName"`
ReplayArn string `json:"ReplayArn"`
EventSourceArn string `json:"EventSourceArn"`
State string `json:"State"` // STARTING, RUNNING, CANCELLING, COMPLETED, CANCELLED, FAILED
StateReason string `json:"StateReason,omitempty"`
}
Replay represents an EventBridge replay.
type ReplayDestination ¶
type ReplayDestination struct {
Arn string `json:"Arn"`
}
ReplayDestination specifies the destination for a replay.
type ReplicationConfig ¶
type ReplicationConfig struct {
State string `json:"State"` // ENABLED, DISABLED
}
ReplicationConfig defines replication settings for an endpoint.
type ResolvedAPIDestination ¶
type ResolvedAPIDestination struct {
OAuth *ResolvedOAuth
HTTPMethod string
Endpoint string
AuthType string
APIKeyName string
APIKeyValue string
BasicUsername string
BasicPassword string
HeaderParameters []ConnectionHeaderParameter
QueryStringParameters []ConnectionQueryStringParameter
BodyParameters []ConnectionBodyParameter
RateLimitPerSecond int
}
ResolvedAPIDestination is the flattened, delivery-ready view of an API destination and its associated connection auth.
type ResolvedOAuth ¶
type ResolvedOAuth struct {
AuthorizationEndpoint string
HTTPMethod string
ClientID string
ClientSecret string
HeaderParameters []ConnectionHeaderParameter
QueryStringParameters []ConnectionQueryStringParameter
BodyParameters []ConnectionBodyParameter
}
ResolvedOAuth carries the OAuth client-credentials configuration used to mint a bearer token for an API destination.
type RetryPolicy ¶
type RetryPolicy struct {
MaximumEventAgeInSeconds int `json:"MaximumEventAgeInSeconds,omitempty"`
MaximumRetryAttempts int `json:"MaximumRetryAttempts,omitempty"`
}
RetryPolicy holds the retry configuration for a target.
type RoutingConfig ¶
type RoutingConfig struct {
FailoverConfig *FailoverConfig `json:"FailoverConfig"`
}
RoutingConfig defines routing configuration for an endpoint.
type Rule ¶
type Rule struct {
Name string `json:"Name"`
Arn string `json:"Arn"`
EventBusName string `json:"EventBusName"`
EventPattern string `json:"EventPattern,omitempty"`
State string `json:"State"`
Description string `json:"Description,omitempty"`
ScheduleExpression string `json:"ScheduleExpression,omitempty"`
RoleArn string `json:"RoleArn,omitempty"`
ManagedBy string `json:"ManagedBy,omitempty"`
// contains filtered or unexported fields
}
Rule represents an EventBridge rule.
type RunCommandParameters ¶
type RunCommandParameters struct {
RunCommandTargets []RunCommandTarget `json:"RunCommandTargets"`
}
RunCommandParameters holds the EC2 Run Command targets for a target rule.
type RunCommandTarget ¶
RunCommandTarget selects EC2 instances by tag or instance ID for Run Command.
type SNSPublisher ¶
SNSPublisher can publish a message to an SNS topic by ARN.
type SQSSender ¶
type SQSSender interface {
SendMessageToQueue(ctx context.Context, queueARN, messageBody string) error
}
SQSSender can send a message to an SQS queue by URL or ARN.
type SageMakerPipelineParameter ¶
SageMakerPipelineParameter is a single name/value pipeline parameter override.
type SageMakerPipelineParameters ¶
type SageMakerPipelineParameters struct {
PipelineParameterList []SageMakerPipelineParameter `json:"PipelineParameterList,omitempty"`
}
SageMakerPipelineParameters holds the pipeline parameter overrides used to start a SageMaker AI Model Building Pipeline execution.
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler fires EventBridge scheduled rules on a regular tick interval. It evaluates all ENABLED rules with a ScheduleExpression and calls PutEvents for any rule whose next fire time has passed since the last tick.
func NewScheduler ¶
func NewScheduler(backend *InMemoryBackend, tickInterval time.Duration) *Scheduler
NewScheduler creates a new Scheduler backed by the given InMemoryBackend.
type Schema ¶
type Schema struct {
LastModified time.Time `json:"LastModified"`
VersionCreatedDate time.Time `json:"VersionCreatedDate"`
Tags map[string]string `json:"Tags,omitempty"`
SchemaArn string `json:"SchemaArn"`
SchemaName string `json:"SchemaName"`
SchemaVersion string `json:"SchemaVersion"`
RegistryName string `json:"RegistryName"`
Description string `json:"Description,omitempty"`
Type string `json:"Type"`
Content string `json:"Content"`
}
Schema represents a schema within a registry.
type SchemaRegistry ¶
type SchemaRegistry struct {
Tags map[string]string `json:"Tags,omitempty"`
RegistryArn string `json:"RegistryArn"`
RegistryName string `json:"RegistryName"`
Description string `json:"Description,omitempty"`
}
SchemaRegistry represents an EventBridge Schema Registry.
type SchemaVersion ¶
type SchemaVersion struct {
CreatedDate time.Time `json:"CreatedDate"`
SchemaArn string `json:"SchemaArn"`
SchemaName string `json:"SchemaName"`
SchemaVersion string `json:"SchemaVersion"`
RegistryName string `json:"RegistryName"`
Type string `json:"Type"`
Content string `json:"Content"`
}
SchemaVersion represents a specific version of a schema.
type Secondary ¶
type Secondary struct {
Route string `json:"Route"`
}
Secondary defines the secondary region route.
type SqsParameters ¶
type SqsParameters struct {
MessageGroupID string `json:"MessageGroupId,omitempty"`
}
SqsParameters holds the FIFO message-group ID to use when the target is an SQS FIFO queue.
type StartReplayInput ¶
type StartReplayInput struct {
EventEndTime time.Time `json:"EventEndTime"`
EventStartTime time.Time `json:"EventStartTime"`
Destination *ReplayDestination `json:"Destination,omitempty"`
Description string `json:"Description,omitempty"`
EventSourceArn string `json:"EventSourceArn"`
ReplayName string `json:"ReplayName"`
}
StartReplayInput is the input for StartReplay.
type StepFunctionsExecutor ¶
type StepFunctionsExecutor interface {
// StartExecution starts an execution of the state machine identified by stateMachineARN.
// The name may be empty (the backend will generate one). input is a JSON string.
StartExecution(stateMachineARN, name, input string) error
}
StepFunctionsExecutor can start a Step Functions state machine execution.
type StorageBackend ¶
type StorageBackend interface {
CreateEventBus(ctx context.Context, name, description string) (*EventBus, error)
DeleteEventBus(ctx context.Context, name string) error
ListEventBuses(ctx context.Context, namePrefix, nextToken string, limit int) ([]EventBus, string, error)
DescribeEventBus(ctx context.Context, name string) (*EventBus, error)
PutRule(ctx context.Context, input PutRuleInput) (*Rule, error)
DeleteRule(ctx context.Context, name, eventBusName string) error
ListRules(ctx context.Context, eventBusName, namePrefix, nextToken string, limit int) ([]Rule, string, error)
DescribeRule(ctx context.Context, name, eventBusName string) (*Rule, error)
EnableRule(ctx context.Context, name, eventBusName string) error
DisableRule(ctx context.Context, name, eventBusName string) error
PutTargets(ctx context.Context, ruleName, eventBusName string, targets []Target) ([]FailedEntry, error)
RemoveTargets(ctx context.Context, ruleName, eventBusName string, ids []string) ([]FailedEntry, error)
ListTargetsByRule(
ctx context.Context,
ruleName, eventBusName, nextToken string,
limit int,
) ([]Target, string, error)
PutEvents(ctx context.Context, entries []EventEntry) ([]EventResultEntry, error)
GetEventLog(ctx context.Context) []EventLogEntry
ActivateEventSource(ctx context.Context, name string) error
DeactivateEventSource(ctx context.Context, name string) error
CreatePartnerEventSource(ctx context.Context, name, account string) (*PartnerEventSource, error)
CancelReplay(ctx context.Context, replayName string) (*Replay, error)
CreateAPIDestination(ctx context.Context, input CreateAPIDestinationInput) (*APIDestination, error)
CreateArchive(ctx context.Context, input CreateArchiveInput) (*Archive, error)
CreateConnection(ctx context.Context, input CreateConnectionInput) (*Connection, error)
CreateEndpoint(ctx context.Context, input CreateEndpointInput) (*Endpoint, error)
DeleteAPIDestination(ctx context.Context, name string) error
DeleteArchive(ctx context.Context, name string) error
DescribeArchive(ctx context.Context, name string) (*Archive, error)
ListArchives(ctx context.Context, namePrefix, nextToken string) ([]Archive, string, error)
UpdateArchive(ctx context.Context, input UpdateArchiveInput) (*Archive, error)
DeleteConnection(ctx context.Context, name string) error
DescribeConnection(ctx context.Context, name string) (*Connection, error)
ListConnections(ctx context.Context, namePrefix, nextToken string) ([]Connection, string, error)
UpdateConnection(ctx context.Context, input UpdateConnectionInput) (*Connection, error)
DeleteEndpoint(ctx context.Context, name string) error
DescribeEndpoint(ctx context.Context, name string) (*Endpoint, error)
ListEndpoints(ctx context.Context, namePrefix, nextToken string) ([]Endpoint, string, error)
UpdateEndpoint(ctx context.Context, input UpdateEndpointInput) (*Endpoint, error)
DescribeAPIDestination(ctx context.Context, name string) (*APIDestination, error)
ListAPIDestinations(ctx context.Context, namePrefix, nextToken string) ([]APIDestination, string, error)
UpdateAPIDestination(ctx context.Context, input UpdateAPIDestinationInput) (*APIDestination, error)
DescribeEventSource(ctx context.Context, name string) (*EventSource, error)
ListEventSources(ctx context.Context, namePrefix, nextToken string) ([]EventSource, string, error)
DescribePartnerEventSource(ctx context.Context, name string) (*PartnerEventSource, error)
DeletePartnerEventSource(ctx context.Context, name string) error
ListPartnerEventSources(ctx context.Context, namePrefix, nextToken string) ([]PartnerEventSource, string, error)
PutPartnerEvents(ctx context.Context, entries []EventEntry) ([]EventResultEntry, error)
DescribeReplay(ctx context.Context, name string) (*Replay, error)
ListReplays(ctx context.Context, namePrefix, nextToken string) ([]Replay, string, error)
StartReplay(ctx context.Context, input StartReplayInput) (*Replay, error)
ListRuleNamesByTarget(ctx context.Context, targetARN, eventBusName, nextToken string) ([]string, string, error)
TestEventPattern(ctx context.Context, pattern, event string) (bool, error)
UpdateEventBus(ctx context.Context, input UpdateEventBusInput) (*EventBus, error)
PutPermission(ctx context.Context, input PutPermissionInput) error
RemovePermission(ctx context.Context, input RemovePermissionInput) error
GetEventBusPolicy(ctx context.Context, eventBusName string) (string, error)
PutEventBusPolicy(ctx context.Context, input PutEventBusPolicyInput) error
CreatePipe(ctx context.Context, input CreatePipeInput) (*Pipe, error)
DeletePipe(ctx context.Context, name string) error
DescribePipe(ctx context.Context, name string) (*Pipe, error)
ListPipes(ctx context.Context, namePrefix, nextToken string) ([]Pipe, string, error)
UpdatePipe(ctx context.Context, input UpdatePipeInput) (*Pipe, error)
// Schema Registry operations.
CreateRegistry(ctx context.Context, input CreateRegistryInput) (*SchemaRegistry, error)
DeleteRegistry(ctx context.Context, registryName string) error
DescribeRegistry(ctx context.Context, registryName string) (*SchemaRegistry, error)
ListRegistries(ctx context.Context, namePrefix, nextToken string) ([]SchemaRegistry, string, error)
UpdateRegistry(ctx context.Context, input UpdateRegistryInput) (*SchemaRegistry, error)
CreateSchema(ctx context.Context, input CreateSchemaInput) (*Schema, error)
DeleteSchema(ctx context.Context, registryName, schemaName string) error
DescribeSchema(ctx context.Context, registryName, schemaName, schemaVersion string) (*Schema, error)
ListSchemas(ctx context.Context, registryName, namePrefix, nextToken string) ([]Schema, string, error)
SearchSchemas(ctx context.Context, registryName, keywords, nextToken string) ([]Schema, string, error)
UpdateSchema(ctx context.Context, input UpdateSchemaInput) (*Schema, error)
ListSchemaVersions(ctx context.Context, registryName, schemaName, nextToken string) ([]SchemaVersion, string, error)
DescribeSchemaVersion(ctx context.Context, registryName, schemaName, schemaVersion string) (*SchemaVersion, error)
DeleteSchemaVersion(ctx context.Context, registryName, schemaName, schemaVersion string) error
GetDiscoveredSchema(ctx context.Context, input GetDiscoveredSchemaInput) (string, error)
PutCodeBinding(ctx context.Context, input PutCodeBindingInput) (*CodeBinding, error)
DescribeCodeBinding(ctx context.Context, input DescribeCodeBindingInput) (*CodeBinding, error)
ListCodeBindings(ctx context.Context, input ListCodeBindingsInput) ([]CodeBinding, string, error)
GetCodeBindingSource(ctx context.Context, registryName, schemaName, language, schemaVersion string) (string, error)
}
StorageBackend is the interface for an EventBridge in-memory store.
type Target ¶
type Target struct {
InputTransformer *InputTransformer `json:"InputTransformer,omitempty"`
DeadLetterConfig *DeadLetterConfig `json:"DeadLetterConfig,omitempty"`
RetryPolicy *RetryPolicy `json:"RetryPolicy,omitempty"`
BatchParameters *BatchParameters `json:"BatchParameters,omitempty"`
AppSyncParameters *AppSyncParameters `json:"AppSyncParameters,omitempty"`
EcsParameters *EcsParameters `json:"EcsParameters,omitempty"`
HTTPParameters *HTTPParameters `json:"HttpParameters,omitempty"`
KinesisParameters *KinesisParameters `json:"KinesisParameters,omitempty"`
RedshiftDataParameters *RedshiftDataParameters `json:"RedshiftDataParameters,omitempty"`
RunCommandParameters *RunCommandParameters `json:"RunCommandParameters,omitempty"`
SageMakerPipelineParameters *SageMakerPipelineParameters `json:"SageMakerPipelineParameters,omitempty"`
SqsParameters *SqsParameters `json:"SqsParameters,omitempty"`
ID string `json:"Id"`
Arn string `json:"Arn"`
RoleArn string `json:"RoleArn,omitempty"`
Input string `json:"Input,omitempty"`
InputPath string `json:"InputPath,omitempty"`
}
Target represents an EventBridge rule target.
type UpdateAPIDestinationInput ¶
type UpdateAPIDestinationInput struct {
ConnectionArn string `json:"ConnectionArn,omitempty"`
Description string `json:"Description,omitempty"`
HTTPMethod string `json:"HttpMethod,omitempty"`
InvocationEndpoint string `json:"InvocationEndpoint,omitempty"`
Name string `json:"Name"`
InvocationRateLimitPerSecond int `json:"InvocationRateLimitPerSecond,omitempty"`
}
UpdateAPIDestinationInput is the input for UpdateApiDestination.
type UpdateArchiveInput ¶
type UpdateArchiveInput struct {
ArchiveName string `json:"ArchiveName"`
Description string `json:"Description,omitempty"`
EventPattern string `json:"EventPattern,omitempty"`
RetentionDays int `json:"RetentionDays,omitempty"`
}
UpdateArchiveInput is the input for UpdateArchive.
type UpdateConnectionInput ¶
type UpdateConnectionInput struct {
AuthorizationType string `json:"AuthorizationType,omitempty"`
AuthParameters *ConnectionAuthParameters `json:"AuthParameters,omitempty"`
Description string `json:"Description,omitempty"`
Name string `json:"Name"`
}
UpdateConnectionInput is the input for UpdateConnection.
type UpdateEndpointInput ¶
type UpdateEndpointInput struct {
ReplicationConfig *ReplicationConfig `json:"ReplicationConfig,omitempty"`
RoutingConfig *RoutingConfig `json:"RoutingConfig,omitempty"`
Description string `json:"Description,omitempty"`
Name string `json:"Name"`
RoleArn string `json:"RoleArn,omitempty"`
EventBuses []EndpointEventBus `json:"EventBuses,omitempty"`
}
UpdateEndpointInput is the input for UpdateEndpoint.
type UpdateEventBusInput ¶
type UpdateEventBusInput struct {
Description string `json:"Description,omitempty"`
Name string `json:"Name"`
}
UpdateEventBusInput is the input for UpdateEventBus.
type UpdatePipeInput ¶
type UpdatePipeInput struct {
Description string `json:"Description,omitempty"`
DesiredState string `json:"DesiredState,omitempty"`
EnrichmentArn string `json:"EnrichmentArn,omitempty"`
Name string `json:"Name"`
RoleArn string `json:"RoleArn,omitempty"`
TargetArn string `json:"TargetArn,omitempty"`
}
UpdatePipeInput is the input for UpdatePipe.
type UpdateRegistryInput ¶
type UpdateRegistryInput struct {
RegistryName string `json:"RegistryName"`
Description string `json:"Description,omitempty"`
}
UpdateRegistryInput is the input for UpdateRegistry.
type UpdateSchemaInput ¶
type UpdateSchemaInput struct {
RegistryName string `json:"RegistryName"`
SchemaName string `json:"SchemaName"`
Type string `json:"Type,omitempty"`
Content string `json:"Content,omitempty"`
Description string `json:"Description,omitempty"`
ClientTokenID string `json:"ClientTokenId,omitempty"`
}
UpdateSchemaInput is the input for UpdateSchema (creates a new version).
Source Files
¶
- accessors.go
- api_destinations.go
- archives.go
- connections.go
- delivery.go
- delivery_api_destination.go
- delivery_transform.go
- delivery_validation.go
- endpoints.go
- event_buses.go
- event_sources.go
- handler_api_destinations.go
- handler_archives.go
- handler_connections.go
- handler_dispatch.go
- handler_endpoints.go
- handler_event_buses.go
- handler_event_sources.go
- handler_events.go
- handler_partner_sources.go
- handler_pipes.go
- handler_registries.go
- handler_replays.go
- handler_rules.go
- handler_schemas.go
- handler_tags.go
- handler_targets.go
- janitor.go
- models.go
- partner_sources.go
- pattern.go
- persistence.go
- pipes.go
- provider.go
- put_events.go
- registries.go
- replays.go
- rules.go
- schedule.go
- scheduler.go
- schemas.go
- sfn_integration.go
- store.go
- store_setup.go
- targets.go