Sparta: github.com/mweagle/Sparta/aws/step Index | Files

package step

import "github.com/mweagle/Sparta/aws/step"

Package step provides functionality to work with AWS Step Functions

Index

Package Files

batch.go doc.go dynamodb.go fargate.go glue.go sagemaker.go sns.go sqs.go step.go

type And Uses

type And struct {
    ChoiceBranch
    Comparison []Comparison
    Next       MachineState
}

And operator

func (*And) MarshalJSON Uses

func (andOperation *And) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type BaseTask Uses

type BaseTask struct {
    ResultPath       string
    TimeoutSeconds   time.Duration
    HeartbeatSeconds time.Duration
    LambdaDecorator  sparta.TemplateDecorator
    Retriers         []*TaskRetry
    Catchers         []*TaskCatch
    // contains filtered or unexported fields
}

BaseTask represents the core BaseTask control flow options.

func (*BaseTask) AdjacentStates Uses

func (bt *BaseTask) AdjacentStates() []MachineState

AdjacentStates returns nodes reachable from this node

func (*BaseTask) MarshalJSON Uses

func (bt *BaseTask) MarshalJSON() ([]byte, error)

MarshalJSON to prevent inadvertent composition

func (*BaseTask) Name Uses

func (bt *BaseTask) Name() string

Name returns the name of this Task state

func (*BaseTask) Next Uses

func (bt *BaseTask) Next(nextState MachineState) MachineState

Next returns the next state

func (*BaseTask) WithCatchers Uses

func (bt *BaseTask) WithCatchers(catch ...*TaskCatch) *BaseTask

WithCatchers is the fluent builder for BaseTask

func (*BaseTask) WithComment Uses

func (bt *BaseTask) WithComment(comment string) TransitionState

WithComment returns the BaseTask comment

func (*BaseTask) WithHeartbeat Uses

func (bt *BaseTask) WithHeartbeat(pulse time.Duration) *BaseTask

WithHeartbeat is the fluent builder for BaseTask

func (*BaseTask) WithInputPath Uses

func (bt *BaseTask) WithInputPath(inputPath string) TransitionState

WithInputPath returns the BaseTask input data selector

func (*BaseTask) WithOutputPath Uses

func (bt *BaseTask) WithOutputPath(outputPath string) TransitionState

WithOutputPath returns the BaseTask output data selector

func (*BaseTask) WithResultPath Uses

func (bt *BaseTask) WithResultPath(resultPath string) *BaseTask

WithResultPath is the fluent builder for the result path

func (*BaseTask) WithRetriers Uses

func (bt *BaseTask) WithRetriers(retries ...*TaskRetry) *BaseTask

WithRetriers is the fluent builder for BaseTask

func (*BaseTask) WithTimeout Uses

func (bt *BaseTask) WithTimeout(timeout time.Duration) *BaseTask

WithTimeout is the fluent builder for BaseTask

type BatchTaskParameters Uses

type BatchTaskParameters struct {
    JobDefinition      gocf.Stringable          `json:",omitempty"`
    JobName            string                   `json:",omitempty"`
    JobQueue           gocf.Stringable          `json:",omitempty"`
    ArrayProperties    map[string]interface{}   `json:",omitempty"`
    ContainerOverrides map[string]interface{}   `json:",omitempty"`
    DependsOn          []map[string]interface{} `json:",omitempty"`
    Parameters         map[string]string        `json:",omitempty"`
    RetryStrategy      map[string]interface{}   `json:",omitempty"`
    Timeout            map[string]interface{}   `json:",omitempty"`
}

BatchTaskParameters represents params for the Batch notification Ref: https://docs.aws.amazon.com/step-functions/latest/dg/connectors-batch.html

type BatchTaskState Uses

type BatchTaskState struct {
    BaseTask
    // contains filtered or unexported fields
}

BatchTaskState represents bindings for https://docs.aws.amazon.com/step-functions/latest/dg/connectors-batch.html

func NewBatchTaskState Uses

func NewBatchTaskState(stateName string,
    parameters BatchTaskParameters) *BatchTaskState

NewBatchTaskState returns an initialized BatchTaskState

func (*BatchTaskState) MarshalJSON Uses

func (bts *BatchTaskState) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling, since this will be stringified and we need it to turn into a stringified Ref: https://docs.aws.amazon.com/step-functions/latest/dg/connectors-batch.html

type BooleanEquals Uses

type BooleanEquals struct {
    Comparison
    Variable string
    Value    interface{}
}

BooleanEquals comparison

func (*BooleanEquals) MarshalJSON Uses

func (cmp *BooleanEquals) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type ChoiceBranch Uses

type ChoiceBranch interface {
    // contains filtered or unexported methods
}

ChoiceBranch represents a type for a ChoiceState "Choices" entry

type ChoiceState Uses

type ChoiceState struct {
    Choices []ChoiceBranch
    Default TransitionState
    // contains filtered or unexported fields
}

ChoiceState is a synthetic state that executes a lot of independent branches in parallel

func NewChoiceState Uses

func NewChoiceState(choiceStateName string, choices ...ChoiceBranch) *ChoiceState

NewChoiceState returns a "ChoiceState" with the supplied information

func (*ChoiceState) MarshalJSON Uses

func (cs *ChoiceState) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

func (*ChoiceState) Name Uses

func (cs *ChoiceState) Name() string

Name returns the name of this Task state

func (*ChoiceState) WithComment Uses

func (cs *ChoiceState) WithComment(comment string) *ChoiceState

WithComment returns the TaskState comment

func (*ChoiceState) WithDefault Uses

func (cs *ChoiceState) WithDefault(defaultState TransitionState) *ChoiceState

WithDefault is the fluent builder for the default state

func (*ChoiceState) WithResultPath Uses

func (cs *ChoiceState) WithResultPath(resultPath string) *ChoiceState

WithResultPath is the fluent builder for the result path

type Comparison Uses

type Comparison interface {
    json.Marshaler
}

Comparison is the generic comparison operator interface

type DynamoDBGetItemParameters Uses

type DynamoDBGetItemParameters struct {
    Key                      map[string]*dynamodb.AttributeValue `json:",omitempty"`
    TableName                gocf.Stringable                     `json:",omitempty"`
    AttributesToGet          []string                            `json:",omitempty"`
    ConsistentRead           bool                                `json:",omitempty"`
    ExpressionAttributeNames map[string]string                   `json:",omitempty"`
    ProjectionExpression     string                              `json:",omitempty"`
    ReturnConsumedCapacity   string                              `json:",omitempty"`
}

DynamoDBGetItemParameters represents params for the DynamoDBGetItem parameters. Ref: https://docs.aws.amazon.com/step-functions/latest/dg/connectors-ddb.html

type DynamoDBGetItemState Uses

type DynamoDBGetItemState struct {
    BaseTask
    // contains filtered or unexported fields
}

DynamoDBGetItemState represents bindings for https://docs.aws.amazon.com/step-functions/latest/dg/connectors-ddb.html

func NewDynamoDBGetItemState Uses

func NewDynamoDBGetItemState(stateName string,
    parameters DynamoDBGetItemParameters) *DynamoDBGetItemState

NewDynamoDBGetItemState returns an initialized DynamoDB GetItem state

func (*DynamoDBGetItemState) MarshalJSON Uses

func (dgis *DynamoDBGetItemState) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling, since this will be stringified and we need it to turn into a stringified Ref: https://docs.aws.amazon.com/step-functions/latest/dg/connectors-sns.html

type DynamoDBPutItemParameters Uses

type DynamoDBPutItemParameters struct {
    Item                        map[string]*dynamodb.AttributeValue
    TableName                   gocf.Stringable
    ConditionExpression         string
    ConsistentRead              bool
    ExpressionAttributeNames    map[string]string
    ExpressionAttributeValues   map[string]*dynamodb.AttributeValue
    ReturnConsumedCapacity      string // INDEXES | TOTAL | NONE
    ReturnItemCollectionMetrics string // SIZE | NONE
    ReturnValues                string // NONE | ALL_OLD | UPDATED_OLD | ALL_NEW | UPDATED_NEW
}

DynamoDBPutItemParameters represents params for the SNS notification Ref: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html#API_Publish_RequestParameters

type DynamoDBPutItemState Uses

type DynamoDBPutItemState struct {
    BaseTask
    // contains filtered or unexported fields
}

DynamoDBPutItemState represents bindings for https://docs.aws.amazon.com/step-functions/latest/dg/connectors-ddb.html

func NewDynamoDBPutItemState Uses

func NewDynamoDBPutItemState(stateName string,
    parameters DynamoDBPutItemParameters) *DynamoDBPutItemState

NewDynamoDBPutItemState returns an initialized DynamoDB PutItem state

func (*DynamoDBPutItemState) MarshalJSON Uses

func (dgis *DynamoDBPutItemState) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling, since this will be stringified and we need it to turn into a stringified Ref: https://docs.aws.amazon.com/step-functions/latest/dg/connectors-sns.html

type FailState Uses

type FailState struct {
    ErrorName string
    Cause     error
    // contains filtered or unexported fields
}

FailState represents the end of state machine

func NewFailState Uses

func NewFailState(failStateName string, errorName string, cause error) *FailState

NewFailState returns a "FailState" with the supplied information

func (*FailState) AdjacentStates Uses

func (fs *FailState) AdjacentStates() []MachineState

AdjacentStates returns nodes reachable from this node

func (*FailState) MarshalJSON Uses

func (fs *FailState) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshaling

func (*FailState) Name Uses

func (fs *FailState) Name() string

Name returns the WaitDelay name

func (*FailState) Next Uses

func (fs *FailState) Next(nextState MachineState) MachineState

Next sets the step after the wait delay

func (*FailState) WithComment Uses

func (fs *FailState) WithComment(comment string) TransitionState

WithComment returns the WaitDelay comment

func (*FailState) WithInputPath Uses

func (fs *FailState) WithInputPath(inputPath string) TransitionState

WithInputPath returns the TaskState input data selector

func (*FailState) WithOutputPath Uses

func (fs *FailState) WithOutputPath(outputPath string) TransitionState

WithOutputPath returns the TaskState output data selector

type FargateNetworkConfiguration Uses

type FargateNetworkConfiguration struct {
    AWSVPCConfiguration *gocf.ECSServiceAwsVPCConfiguration `json:"AwsvpcConfiguration,omitempty"`
}

FargateNetworkConfiguration contains the AWSVPCConfiguration information

type FargateTaskParameters Uses

type FargateTaskParameters struct {
    Cluster              gocf.Stringable              `json:",omitempty"`
    Group                string                       `json:",omitempty"`
    LaunchType           string                       `json:",omitempty"`
    NetworkConfiguration *FargateNetworkConfiguration `json:",omitempty"`
    Overrides            map[string]interface{}       `json:",omitempty"`
    PlacementConstraints []map[string]string          `json:",omitempty"`
    PlacementStrategy    []map[string]string          `json:",omitempty"`
    PlatformVersion      string                       `json:",omitempty"`
    TaskDefinition       gocf.Stringable              `json:",omitempty"`
}

FargateTaskParameters contains the information for a Fargate task

type FargateTaskState Uses

type FargateTaskState struct {
    BaseTask
    // contains filtered or unexported fields
}

FargateTaskState represents a FargateTask

func NewFargateTaskState Uses

func NewFargateTaskState(stateName string, parameters FargateTaskParameters) *FargateTaskState

NewFargateTaskState returns an initialized FargateTaskState

func (*FargateTaskState) MarshalJSON Uses

func (fts *FargateTaskState) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling, since this will be stringified and we need it to turn into a stringified Ref: https://docs.aws.amazon.com/step-functions/latest/dg/connectors-ecs.html

type GlueParameters Uses

type GlueParameters struct {
    JobName               gocf.Stringable        `json:",omitempty"`
    JobRunID              string                 `json:"JobRunId,omitempty"`
    Arguments             map[string]interface{} `json:",omitempty"`
    AllocatedCapacity     *gocf.IntegerExpr      `json:",omitempty"`
    Timeout               *gocf.IntegerExpr      `json:",omitempty"`
    SecurityConfiguration gocf.Stringable        `json:",omitempty"`
    NotificationProperty  interface{}            `json:",omitempty"`
}

GlueParameters represents params for Glue step Ref: https://docs.aws.amazon.com/step-functions/latest/dg/connectors-glue.html

type GlueState Uses

type GlueState struct {
    BaseTask
    // contains filtered or unexported fields
}

GlueState represents bindings for https://docs.aws.amazon.com/step-functions/latest/dg/connectors-sns.html

func NewGlueState Uses

func NewGlueState(stateName string,
    parameters GlueParameters) *GlueState

NewGlueState returns an initialized GlueState

func (*GlueState) MarshalJSON Uses

func (gs *GlueState) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling, since this will be stringified and we need it to turn into a stringified Ref: https://docs.aws.amazon.com/step-functions/latest/dg/connectors-sns.html

type LambdaTaskState Uses

type LambdaTaskState struct {
    BaseTask
    // contains filtered or unexported fields
}

LambdaTaskState is the core state, responsible for delegating to a Lambda function

func NewLambdaTaskState Uses

func NewLambdaTaskState(stateName string, lambdaFn *sparta.LambdaAWSInfo) *LambdaTaskState

NewLambdaTaskState returns a LambdaTaskState instance properly initialized

func (*LambdaTaskState) MarshalJSON Uses

func (ts *LambdaTaskState) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling, since this will be stringified and we need it to turn into a stringified Ref:

type MachineState Uses

type MachineState interface {
    Name() string
    // contains filtered or unexported methods
}

MachineState is the base state for all AWS Step function

type Not Uses

type Not struct {
    ChoiceBranch
    Comparison Comparison
    Next       MachineState
}

Not operator

func (*Not) MarshalJSON Uses

func (notOperation *Not) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type NumericEquals Uses

type NumericEquals struct {
    Comparison
    Variable string
    Value    int64
}

NumericEquals comparison

func (*NumericEquals) MarshalJSON Uses

func (cmp *NumericEquals) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type NumericGreaterThan Uses

type NumericGreaterThan struct {
    Comparison
    Variable string
    Value    int64
}

NumericGreaterThan comparison

func (*NumericGreaterThan) MarshalJSON Uses

func (cmp *NumericGreaterThan) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type NumericGreaterThanEquals Uses

type NumericGreaterThanEquals struct {
    Comparison
    Variable string
    Value    int64
}

NumericGreaterThanEquals comparison

func (*NumericGreaterThanEquals) MarshalJSON Uses

func (cmp *NumericGreaterThanEquals) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type NumericLessThan Uses

type NumericLessThan struct {
    Comparison
    Variable string
    Value    int64
}

NumericLessThan comparison

func (*NumericLessThan) MarshalJSON Uses

func (cmp *NumericLessThan) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type NumericLessThanEquals Uses

type NumericLessThanEquals struct {
    Comparison
    Variable string
    Value    int64
}

NumericLessThanEquals comparison

func (*NumericLessThanEquals) MarshalJSON Uses

func (cmp *NumericLessThanEquals) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type Or Uses

type Or struct {
    ChoiceBranch
    Comparison []Comparison
    Next       MachineState
}

Or operator

func (*Or) MarshalJSON Uses

func (orOperation *Or) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type ParallelState Uses

type ParallelState struct {
    States     StateMachine
    ResultPath string
    Retriers   []*TaskRetry
    Catchers   []*TaskCatch
    // contains filtered or unexported fields
}

ParallelState is a synthetic state that executes a lot of independent branches in parallel

func NewParallelState Uses

func NewParallelState(parallelStateName string, states StateMachine) *ParallelState

NewParallelState returns a "ParallelState" with the supplied information

func (*ParallelState) AdjacentStates Uses

func (ps *ParallelState) AdjacentStates() []MachineState

AdjacentStates returns nodes reachable from this node

func (*ParallelState) MarshalJSON Uses

func (ps *ParallelState) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

func (*ParallelState) Name Uses

func (ps *ParallelState) Name() string

Name returns the name of this Task state

func (*ParallelState) Next Uses

func (ps *ParallelState) Next(nextState MachineState) MachineState

Next returns the next state

func (*ParallelState) WithCatchers Uses

func (ps *ParallelState) WithCatchers(catch ...*TaskCatch) *ParallelState

WithCatchers is the fluent builder for TaskState

func (*ParallelState) WithComment Uses

func (ps *ParallelState) WithComment(comment string) TransitionState

WithComment returns the TaskState comment

func (*ParallelState) WithInputPath Uses

func (ps *ParallelState) WithInputPath(inputPath string) TransitionState

WithInputPath returns the TaskState input data selector

func (*ParallelState) WithOutputPath Uses

func (ps *ParallelState) WithOutputPath(outputPath string) TransitionState

WithOutputPath returns the TaskState output data selector

func (*ParallelState) WithResultPath Uses

func (ps *ParallelState) WithResultPath(resultPath string) *ParallelState

WithResultPath is the fluent builder for the result path

func (*ParallelState) WithRetriers Uses

func (ps *ParallelState) WithRetriers(retries ...*TaskRetry) *ParallelState

WithRetriers is the fluent builder for TaskState

type PassState Uses

type PassState struct {
    ResultPath string
    Result     interface{}
    // contains filtered or unexported fields
}

PassState represents a NOP state

func NewPassState Uses

func NewPassState(name string, resultData interface{}) *PassState

NewPassState returns a new PassState instance

func (*PassState) AdjacentStates Uses

func (ps *PassState) AdjacentStates() []MachineState

AdjacentStates returns nodes reachable from this node

func (*PassState) MarshalJSON Uses

func (ps *PassState) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

func (*PassState) Name Uses

func (ps *PassState) Name() string

Name returns the name of this Task state

func (*PassState) Next Uses

func (ps *PassState) Next(nextState MachineState) MachineState

Next returns the next state

func (*PassState) WithComment Uses

func (ps *PassState) WithComment(comment string) TransitionState

WithComment returns the TaskState comment

func (*PassState) WithInputPath Uses

func (ps *PassState) WithInputPath(inputPath string) TransitionState

WithInputPath returns the TaskState input data selector

func (*PassState) WithOutputPath Uses

func (ps *PassState) WithOutputPath(outputPath string) TransitionState

WithOutputPath returns the TaskState output data selector

func (*PassState) WithResult Uses

func (ps *PassState) WithResult(result interface{}) *PassState

WithResult is the fluent builder for the result data

func (*PassState) WithResultPath Uses

func (ps *PassState) WithResultPath(resultPath string) *PassState

WithResultPath is the fluent builder for the result path

type SNSTaskParameters Uses

type SNSTaskParameters struct {
    Message           string                 `json:",omitempty"`
    Subject           string                 `json:",omitempty"`
    MessageAttributes map[string]interface{} `json:",omitempty"`
    MessageStructure  string                 `json:",omitempty"`
    PhoneNumber       string                 `json:",omitempty"`
    TargetArn         gocf.Stringable        `json:",omitempty"`
    TopicArn          gocf.Stringable        `json:",omitempty"`
}

SNSTaskParameters represents params for the SNS notification Ref: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html#API_Publish_RequestParameters

type SNSTaskState Uses

type SNSTaskState struct {
    BaseTask
    // contains filtered or unexported fields
}

SNSTaskState represents bindings for https://docs.aws.amazon.com/step-functions/latest/dg/connectors-sns.html

func NewSNSTaskState Uses

func NewSNSTaskState(stateName string,
    parameters SNSTaskParameters) *SNSTaskState

NewSNSTaskState returns an initialized SNSTaskState

func (*SNSTaskState) MarshalJSON Uses

func (sts *SNSTaskState) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling, since this will be stringified and we need it to turn into a stringified Ref: https://docs.aws.amazon.com/step-functions/latest/dg/connectors-sns.html

type SQSTaskParameters Uses

type SQSTaskParameters struct {
    MessageBody            string                 `json:",omitempty"`
    QueueURL               gocf.Stringable        `json:",omitempty"`
    DelaySeconds           int                    `json:",omitempty"`
    MessageAttributes      map[string]interface{} `json:",omitempty"`
    MessageDeduplicationID string                 `json:"MessageDeduplicationId,omitempty"`
    MessageGroupID         string                 `json:"MessageGroupId,omitempty"`
}

SQSTaskParameters represents params for the SQS notification Ref: https://docs.aws.amazon.com/sns/latest/api/API_Publish.html#API_Publish_RequestParameters

type SQSTaskState Uses

type SQSTaskState struct {
    BaseTask
    // contains filtered or unexported fields
}

SQSTaskState represents bindings for https://docs.aws.amazon.com/step-functions/latest/dg/connectors-sqs.html

func NewSQSTaskState Uses

func NewSQSTaskState(stateName string,
    parameters SQSTaskParameters) *SQSTaskState

NewSQSTaskState returns an initialized SQSTaskState

func (*SQSTaskState) MarshalJSON Uses

func (sqs *SQSTaskState) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling, since this will be stringified and we need it to turn into a stringified Ref: https://docs.aws.amazon.com/step-functions/latest/dg/connectors-sqs.html

type SageMakerTag Uses

type SageMakerTag struct {
    Key   string          `json:",omitempty"`
    Value gocf.Stringable `json:",omitempty"`
}

SageMakerTag represents a tag for a SageMaker task

type SageMakerTrainingJob Uses

type SageMakerTrainingJob struct {
    BaseTask
    // contains filtered or unexported fields
}

SageMakerTrainingJob represents bindings for https://docs.aws.amazon.com/step-functions/latest/dg/connectors-sqs.html

func NewSageMakerTrainingJob Uses

func NewSageMakerTrainingJob(stateName string,
    parameters SageMakerTrainingJobParameters) *SageMakerTrainingJob

NewSageMakerTrainingJob returns an initialized SQSTaskState

func (*SageMakerTrainingJob) MarshalJSON Uses

func (smtj *SageMakerTrainingJob) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling, since this will be stringified and we need it to turn into a stringified Ref: https://docs.aws.amazon.com/step-functions/latest/dg/connectors-sqs.html

type SageMakerTrainingJobParameters Uses

type SageMakerTrainingJobParameters struct {
    AlgorithmSpecification map[string]interface{} `json:",omitempty"`
    HyperParameters        map[string]interface{} `json:",omitempty"`
    InputDataConfig        []interface{}          `json:",omitempty"`
    OutputDataConfig       map[string]interface{} `json:",omitempty"`
    ResourceConfig         map[string]interface{} `json:",omitempty"`
    RoleArn                gocf.Stringable        `json:",omitempty"`
    StoppingCondition      interface{}            `json:",omitempty"`
    Tags                   []SageMakerTag         `json:",omitempty"`
    TrainingJobName        string                 `json:",omitempty"`
    VpcConfig              map[string]interface{} `json:",omitempty"`
}

SageMakerTrainingJobParameters are the parameters for a SageMaker Training Job as defined by https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTrainingJob.html

type SageMakerTransformJob Uses

type SageMakerTransformJob struct {
    BaseTask
    // contains filtered or unexported fields
}

SageMakerTransformJob represents bindings for https://docs.aws.amazon.com/step-functions/latest/dg/connectors-sqs.html

func NewSageMakerTransformJob Uses

func NewSageMakerTransformJob(stateName string,
    parameters SageMakerTransformJobParameters) *SageMakerTransformJob

NewSageMakerTransformJob returns an initialized SQSTaskState

func (*SageMakerTransformJob) MarshalJSON Uses

func (smtj *SageMakerTransformJob) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling, since this will be stringified and we need it to turn into a stringified Ref: https://docs.aws.amazon.com/step-functions/latest/dg/connectors-sqs.html

type SageMakerTransformJobParameters Uses

type SageMakerTransformJobParameters struct {
    BatchStrategy           string                 `json:",omitempty"`
    Environment             map[string]string      `json:",omitempty"`
    MaxConcurrentTransforms int                    `json:",omitempty"`
    MaxPayloadInMB          int                    `json:",omitempty"`
    ModelName               string                 `json:",omitempty"`
    Tags                    []SageMakerTag         `json:",omitempty"`
    TransformInput          map[string]interface{} `json:",omitempty"`
    TransformJobName        string                 `json:",omitempty"`
    TransformOutput         map[string]interface{} `json:",omitempty"`
    TransformResources      map[string]interface{} `json:",omitempty"`
}

SageMakerTransformJobParameters are the parameters for a SageMaker Training Job as defined by https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTransformJob.html

type StateError Uses

type StateError string

StateError is the reserved type used for AWS Step function error names Ref: https://states-language.net/spec.html#appendix-a

const (
    // StatesAll is a wild-card which matches any Error Name.
    StatesAll StateError = "States.ALL"
    // StatesTimeout is a Task State either ran longer than the
    // “TimeoutSeconds” value, or failed to heartbeat for a time
    // longer than the “HeartbeatSeconds” value.
    StatesTimeout StateError = "States.Timeout"
    // StatesTaskFailed is a Task State failed during the execution
    StatesTaskFailed StateError = "States.TaskFailed"
    // StatesPermissions is a Task State failed because it had
    // insufficient privileges to execute the specified code.
    StatesPermissions StateError = "States.Permissions"
    // StatesResultPathMatchFailure is a Task State’s “ResultPath” field
    // cannot be applied to the input the state received
    StatesResultPathMatchFailure StateError = "States.ResultPathMatchFailure"
    // StatesBranchFailed is a branch of a Parallel state failed
    StatesBranchFailed StateError = "States.BranchFailed"
    // StatesNoChoiceMatched is a Choice state failed to find a match for the
    // condition field extracted from its input
    StatesNoChoiceMatched StateError = "States.NoChoiceMatched"
)

type StateMachine Uses

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

StateMachine is the top level item

func NewStateMachine Uses

func NewStateMachine(stateMachineName string,
    startState TransitionState) *StateMachine

NewStateMachine returns a new StateMachine instance

func (*StateMachine) Comment Uses

func (sm *StateMachine) Comment(comment string) *StateMachine

Comment sets the StateMachine comment

func (*StateMachine) MarshalJSON Uses

func (sm *StateMachine) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

func (*StateMachine) StateMachineDecorator Uses

func (sm *StateMachine) StateMachineDecorator() sparta.ServiceDecoratorHookFunc

StateMachineDecorator is a decorator that returns a default CloudFormationResource named decorator

func (*StateMachine) StateMachineNamedDecorator Uses

func (sm *StateMachine) StateMachineNamedDecorator(stepFunctionResourceName string) sparta.ServiceDecoratorHookFunc

StateMachineNamedDecorator is the hook exposed by the StateMachine to insert the AWS Step function into the CloudFormation template

func (*StateMachine) WithRoleArn Uses

func (sm *StateMachine) WithRoleArn(roleArn gocf.Stringable) *StateMachine

WithRoleArn sets the state machine roleArn

type StringEquals Uses

type StringEquals struct {
    Comparison
    Variable string
    Value    string
}

StringEquals comparison

func (*StringEquals) MarshalJSON Uses

func (cmp *StringEquals) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type StringGreaterThan Uses

type StringGreaterThan struct {
    Comparison
    Variable string
    Value    string
}

StringGreaterThan comparison

func (*StringGreaterThan) MarshalJSON Uses

func (cmp *StringGreaterThan) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type StringGreaterThanEquals Uses

type StringGreaterThanEquals struct {
    Comparison
    Variable string
    Value    string
}

StringGreaterThanEquals comparison

func (*StringGreaterThanEquals) MarshalJSON Uses

func (cmp *StringGreaterThanEquals) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type StringLessThan Uses

type StringLessThan struct {
    Comparison
    Variable string
    Value    string
}

StringLessThan comparison

func (*StringLessThan) MarshalJSON Uses

func (cmp *StringLessThan) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type StringLessThanEquals Uses

type StringLessThanEquals struct {
    Variable string
    Value    string
}

StringLessThanEquals comparison

func (*StringLessThanEquals) MarshalJSON Uses

func (cmp *StringLessThanEquals) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type SuccessState Uses

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

SuccessState represents the end of the state machine

func NewSuccessState Uses

func NewSuccessState(name string) *SuccessState

NewSuccessState returns a "SuccessState" with the supplied name

func (*SuccessState) AdjacentStates Uses

func (ss *SuccessState) AdjacentStates() []MachineState

AdjacentStates returns nodes reachable from this node

func (*SuccessState) MarshalJSON Uses

func (ss *SuccessState) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

func (*SuccessState) Name Uses

func (ss *SuccessState) Name() string

Name returns the WaitDelay name

func (*SuccessState) Next Uses

func (ss *SuccessState) Next(nextState MachineState) MachineState

Next sets the step after the wait delay

func (*SuccessState) WithComment Uses

func (ss *SuccessState) WithComment(comment string) TransitionState

WithComment returns the WaitDelay comment

func (*SuccessState) WithInputPath Uses

func (ss *SuccessState) WithInputPath(inputPath string) TransitionState

WithInputPath returns the TaskState input data selector

func (*SuccessState) WithOutputPath Uses

func (ss *SuccessState) WithOutputPath(outputPath string) TransitionState

WithOutputPath returns the TaskState output data selector

type TaskCatch Uses

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

TaskCatch is an action to handle a failing operation

func NewTaskCatch Uses

func NewTaskCatch(nextState TransitionState, errors ...StateError) *TaskCatch

NewTaskCatch returns a new TaskCatch instance

func (*TaskCatch) MarshalJSON Uses

func (tc *TaskCatch) MarshalJSON() ([]byte, error)

MarshalJSON to prevent inadvertent composition

type TaskRetry Uses

type TaskRetry struct {
    ErrorEquals     []StateError  `json:",omitempty"`
    IntervalSeconds time.Duration `json:",omitempty"`
    MaxAttempts     int           `json:",omitempty"`
    BackoffRate     float32       `json:",omitempty"`
}

TaskRetry is an action to perform in response to a Task failure

func NewTaskRetry Uses

func NewTaskRetry() *TaskRetry

NewTaskRetry returns a new TaskRetry instance

func (*TaskRetry) WithBackoffRate Uses

func (tr *TaskRetry) WithBackoffRate(backoffRate float32) *TaskRetry

WithBackoffRate is the fluent builder

func (*TaskRetry) WithErrors Uses

func (tr *TaskRetry) WithErrors(errors ...StateError) *TaskRetry

WithErrors is the fluent builder

func (*TaskRetry) WithInterval Uses

func (tr *TaskRetry) WithInterval(interval time.Duration) *TaskRetry

WithInterval is the fluent builder

func (*TaskRetry) WithMaxAttempts Uses

func (tr *TaskRetry) WithMaxAttempts(maxAttempts int) *TaskRetry

WithMaxAttempts is the fluent builder

type TimestampEquals Uses

type TimestampEquals struct {
    Comparison
    Variable string
    Value    time.Time
}

TimestampEquals comparison

func (*TimestampEquals) MarshalJSON Uses

func (cmp *TimestampEquals) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type TimestampGreaterThan Uses

type TimestampGreaterThan struct {
    Variable string
    Value    time.Time
}

TimestampGreaterThan comparison

func (*TimestampGreaterThan) MarshalJSON Uses

func (cmp *TimestampGreaterThan) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type TimestampGreaterThanEquals Uses

type TimestampGreaterThanEquals struct {
    Comparison
    Variable string
    Value    time.Time
}

TimestampGreaterThanEquals comparison

func (*TimestampGreaterThanEquals) MarshalJSON Uses

func (cmp *TimestampGreaterThanEquals) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type TimestampLessThan Uses

type TimestampLessThan struct {
    Comparison
    Variable string
    Value    time.Time
}

TimestampLessThan comparison

func (*TimestampLessThan) MarshalJSON Uses

func (cmp *TimestampLessThan) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type TimestampLessThanEquals Uses

type TimestampLessThanEquals struct {
    Comparison
    Variable string
    Value    time.Time
}

TimestampLessThanEquals comparison

func (*TimestampLessThanEquals) MarshalJSON Uses

func (cmp *TimestampLessThanEquals) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

type TransitionState Uses

type TransitionState interface {
    MachineState
    Next(state MachineState) MachineState
    // AdjacentStates returns all the MachineStates that are reachable from
    // the current state
    AdjacentStates() []MachineState
    WithComment(string) TransitionState
    WithInputPath(string) TransitionState
    WithOutputPath(string) TransitionState
}

TransitionState is the generic state according to https://states-language.net/spec.html#state-type-table

type WaitDelay Uses

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

WaitDelay is a delay with an interval

func NewWaitDelayState Uses

func NewWaitDelayState(stateName string, delayInSeconds time.Duration) *WaitDelay

NewWaitDelayState returns a new WaitDelay pointer instance

func (*WaitDelay) AdjacentStates Uses

func (wd *WaitDelay) AdjacentStates() []MachineState

AdjacentStates returns nodes reachable from this node

func (*WaitDelay) MarshalJSON Uses

func (wd *WaitDelay) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

func (*WaitDelay) Name Uses

func (wd *WaitDelay) Name() string

Name returns the WaitDelay name

func (*WaitDelay) Next Uses

func (wd *WaitDelay) Next(nextState MachineState) MachineState

Next sets the step after the wait delay

func (*WaitDelay) WithComment Uses

func (wd *WaitDelay) WithComment(comment string) TransitionState

WithComment returns the WaitDelay comment

func (*WaitDelay) WithInputPath Uses

func (wd *WaitDelay) WithInputPath(inputPath string) TransitionState

WithInputPath returns the TaskState input data selector

func (*WaitDelay) WithOutputPath Uses

func (wd *WaitDelay) WithOutputPath(outputPath string) TransitionState

WithOutputPath returns the TaskState output data selector

type WaitDynamicUntil Uses

type WaitDynamicUntil struct {
    TimestampPath string
    // contains filtered or unexported fields
}

WaitDynamicUntil is a delay based on a previous response

func NewWaitDynamicUntilState Uses

func NewWaitDynamicUntilState(stateName string, timestampPath string) *WaitDynamicUntil

NewWaitDynamicUntilState returns a new WaitDynamicUntil pointer instance

func (*WaitDynamicUntil) AdjacentStates Uses

func (wdu *WaitDynamicUntil) AdjacentStates() []MachineState

AdjacentStates returns nodes reachable from this node

func (*WaitDynamicUntil) MarshalJSON Uses

func (wdu *WaitDynamicUntil) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

func (*WaitDynamicUntil) Name Uses

func (wdu *WaitDynamicUntil) Name() string

Name returns the WaitDelay name

func (*WaitDynamicUntil) Next Uses

func (wdu *WaitDynamicUntil) Next(nextState MachineState) MachineState

Next sets the step after the wait delay

func (*WaitDynamicUntil) WithComment Uses

func (wdu *WaitDynamicUntil) WithComment(comment string) TransitionState

WithComment returns the WaitDelay comment

func (*WaitDynamicUntil) WithInputPath Uses

func (wdu *WaitDynamicUntil) WithInputPath(inputPath string) TransitionState

WithInputPath returns the TaskState input data selector

func (*WaitDynamicUntil) WithOutputPath Uses

func (wdu *WaitDynamicUntil) WithOutputPath(outputPath string) TransitionState

WithOutputPath returns the TaskState output data selector

type WaitUntil Uses

type WaitUntil struct {
    Timestamp time.Time
    // contains filtered or unexported fields
}

WaitUntil is a delay with an absolute time gate

func NewWaitUntilState Uses

func NewWaitUntilState(stateName string, waitUntil time.Time) *WaitUntil

NewWaitUntilState returns a new WaitDelay pointer instance

func (*WaitUntil) AdjacentStates Uses

func (wu *WaitUntil) AdjacentStates() []MachineState

AdjacentStates returns nodes reachable from this node

func (*WaitUntil) MarshalJSON Uses

func (wu *WaitUntil) MarshalJSON() ([]byte, error)

MarshalJSON for custom marshalling

func (*WaitUntil) Name Uses

func (wu *WaitUntil) Name() string

Name returns the WaitDelay name

func (*WaitUntil) Next Uses

func (wu *WaitUntil) Next(nextState MachineState) MachineState

Next sets the step after the wait delay

func (*WaitUntil) WithComment Uses

func (wu *WaitUntil) WithComment(comment string) TransitionState

WithComment returns the WaitDelay comment

func (*WaitUntil) WithInputPath Uses

func (wu *WaitUntil) WithInputPath(inputPath string) TransitionState

WithInputPath returns the TaskState input data selector

func (*WaitUntil) WithOutputPath Uses

func (wu *WaitUntil) WithOutputPath(outputPath string) TransitionState

WithOutputPath returns the TaskState output data selector

Package step imports 14 packages (graph). Updated 2018-12-15. Refresh now. Tools for package owners.