sugar

package
Version: v0.0.0-...-8e6450d Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package sugar provides some helpers to reduce boilerplate around aws-sdk-go it is imported as `import . "github.com/sclasen/swfsm/sugar"` for most reduction of keystrokes

Index

Constants

View Source
const (
	ErrorTypeUnknownResourceFault                 = "UnknownResourceFault"
	ErrorTypeWorkflowExecutionAlreadyStartedFault = "WorkflowExecutionAlreadyStartedFault"
	ErrorTypeDomainAlreadyExistsFault             = "DomainAlreadyExistsFault"
	ErrorTypeAlreadyExistsFault                   = "TypeAlreadyExistsFault"
	ErrorTypeStreamNotFound                       = "ResourceNotFoundException"
	ErrorTypeStreamAlreadyExists                  = "ResourceInUseException"
)

error code constants

Variables

This section is empty.

Functions

func EventFromPayload

func EventFromPayload(eventId int, data interface{}) *swf.HistoryEvent

EventFromPayload will construct swf.HistoryEvent with the correct id, event type and Attributes struct set, based on the type of the data passed to it, which should be one of the swf.*EventAttributes structs.

func I

func I(i int) *int64

I is a helper so you dont have to type aws.Long(int64(myInt))

func L

func L(l int64) *int64

L is a helper so you dont have to type aws.Long(myLong)

func LL

func LL(l *int64) string

LL is a helper so you dont have to do nil checks before logging aws.LongValue values

func LS

func LS(s *string) string

LS is a helper so you dont have to do nil checks before logging aws.StringValue values

func PrettyDecision

func PrettyDecision(d swf.Decision) string

PrettyDecision pretty prints a swf.Decision in a readable form for logging.

func PrettyHistoryEvent

func PrettyHistoryEvent(h *swf.HistoryEvent) string

PrettyHistoryEvent pretty prints a swf.HistoryEvent in a readable form for logging.

func S

func S(s string) *string

S is a helper so you dont have to type aws.String(myString)

func SWFDecisionTypes

func SWFDecisionTypes() []string

SWFDecisionTypes returns a slice containing the valid values of the Decision.DecisionType field.

func SWFHistoryEventTypes

func SWFHistoryEventTypes() []string

SWFHistoryEventTypes returns a slice containing the valid values of the HistoryEvent.EventType field.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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