Documentation
¶
Index ¶
- type Execution
- type ExecutionStatus
- type HistoryEvent
- type StateMachine
- type StateMachineStatus
- type StepFunctionsService
- func (s *StepFunctionsService) Actions() []service.Action
- func (s *StepFunctionsService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
- func (s *StepFunctionsService) HealthCheck() error
- func (s *StepFunctionsService) Name() string
- func (s *StepFunctionsService) ResourceSchemas() []schema.ResourceSchema
- type Store
- func (s *Store) CreateStateMachine(name, definition, roleArn, smType string, tags map[string]string) (*StateMachine, *service.AWSError)
- func (s *Store) DeleteStateMachine(arn string) *service.AWSError
- func (s *Store) GetExecution(execArn string) (*Execution, *service.AWSError)
- func (s *Store) GetExecutionHistory(execArn string) ([]HistoryEvent, *service.AWSError)
- func (s *Store) GetStateMachine(arn string) (*StateMachine, *service.AWSError)
- func (s *Store) ListExecutions(smArn string) ([]*Execution, *service.AWSError)
- func (s *Store) ListStateMachines() []*StateMachine
- func (s *Store) ListTagsForResource(resourceArn string) (map[string]string, *service.AWSError)
- func (s *Store) StartExecution(smArn, execName, input string) (*Execution, *service.AWSError)
- func (s *Store) StopExecution(execArn, cause, errCode string) (*Execution, *service.AWSError)
- func (s *Store) TagResource(resourceArn string, tags map[string]string) *service.AWSError
- func (s *Store) UntagResource(resourceArn string, tagKeys []string) *service.AWSError
- func (s *Store) UpdateStateMachine(arn, definition, roleArn string) (*StateMachine, *service.AWSError)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Execution ¶
type Execution struct {
ExecutionArn string
StateMachineArn string
Name string
Status ExecutionStatus
Input string
Output string
StartDate time.Time
StopDate *time.Time
Events []HistoryEvent
}
Execution holds all metadata and history for a state machine execution.
type ExecutionStatus ¶
type ExecutionStatus string
ExecutionStatus is the lifecycle state of an execution.
type HistoryEvent ¶
HistoryEvent is a single event in an execution's history.
type StateMachine ¶
type StateMachine struct {
Arn string
Name string
Definition string // ASL JSON string
RoleArn string
Type string // STANDARD | EXPRESS
Status StateMachineStatus
CreationDate time.Time
Tags map[string]string
}
StateMachine holds all metadata for an AWS Step Functions state machine.
type StateMachineStatus ¶
type StateMachineStatus string
StateMachineStatus is the lifecycle state of a state machine.
type StepFunctionsService ¶
type StepFunctionsService struct {
// contains filtered or unexported fields
}
StepFunctionsService is the cloudmock implementation of the AWS Step Functions API.
func New ¶
func New(accountID, region string) *StepFunctionsService
New returns a new StepFunctionsService for the given AWS account ID and region.
func (*StepFunctionsService) Actions ¶
func (s *StepFunctionsService) Actions() []service.Action
Actions returns the list of Step Functions API actions supported by this service.
func (*StepFunctionsService) HandleRequest ¶
func (s *StepFunctionsService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
HandleRequest routes an incoming Step Functions request to the appropriate handler. Step Functions uses the JSON protocol; the action is parsed from X-Amz-Target by the gateway (e.g. "AWSStepFunctions.CreateStateMachine" → "CreateStateMachine").
func (*StepFunctionsService) HealthCheck ¶
func (s *StepFunctionsService) HealthCheck() error
HealthCheck always returns nil (no external dependencies).
func (*StepFunctionsService) Name ¶
func (s *StepFunctionsService) Name() string
Name returns the AWS service name used for routing. Step Functions uses "states" as the credential scope service name.
func (*StepFunctionsService) ResourceSchemas ¶
func (s *StepFunctionsService) ResourceSchemas() []schema.ResourceSchema
ResourceSchemas returns the schema for Step Functions resource types.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the in-memory store for Step Functions state machines and executions.
func (*Store) CreateStateMachine ¶
func (s *Store) CreateStateMachine(name, definition, roleArn, smType string, tags map[string]string) (*StateMachine, *service.AWSError)
CreateStateMachine creates a new state machine and returns it.
func (*Store) DeleteStateMachine ¶
DeleteStateMachine removes a state machine by ARN.
func (*Store) GetExecution ¶
GetExecution retrieves an execution by ARN.
func (*Store) GetExecutionHistory ¶
func (s *Store) GetExecutionHistory(execArn string) ([]HistoryEvent, *service.AWSError)
GetExecutionHistory returns the events for an execution.
func (*Store) GetStateMachine ¶
func (s *Store) GetStateMachine(arn string) (*StateMachine, *service.AWSError)
GetStateMachine retrieves a state machine by ARN.
func (*Store) ListExecutions ¶
ListExecutions returns all executions for a given state machine ARN.
func (*Store) ListStateMachines ¶
func (s *Store) ListStateMachines() []*StateMachine
ListStateMachines returns a snapshot of all state machines.
func (*Store) ListTagsForResource ¶
ListTagsForResource returns the tags for a state machine identified by ARN.
func (*Store) StartExecution ¶
StartExecution creates a new execution for the given state machine and immediately marks it as SUCCEEDED with Output=Input (pass-through; real ASL execution is deferred).
func (*Store) StopExecution ¶
StopExecution aborts an execution by ARN.
func (*Store) TagResource ¶
TagResource applies tags to a state machine identified by ARN.
func (*Store) UntagResource ¶
UntagResource removes tags from a state machine identified by ARN.
func (*Store) UpdateStateMachine ¶
func (s *Store) UpdateStateMachine(arn, definition, roleArn string) (*StateMachine, *service.AWSError)
UpdateStateMachine updates the definition and/or roleArn of a state machine.