Skip to content

Commit a495a57

Browse files
committed
Export cancel_timer and sideeffect commands
1 parent ed865aa commit a495a57

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

internal/command/cancel_timer.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ import (
55
"github.com/cschleiden/go-workflows/internal/history"
66
)
77

8-
type cancelTimerCommand struct {
8+
type CancelTimerCommand struct {
99
command
1010

1111
TimerScheduleEventID int64
1212
}
1313

14-
var _ Command = (*cancelTimerCommand)(nil)
14+
var _ Command = (*CancelTimerCommand)(nil)
1515

16-
func NewCancelTimerCommand(id int64, timerScheduleEventID int64) *cancelTimerCommand {
17-
return &cancelTimerCommand{
16+
func NewCancelTimerCommand(id int64, timerScheduleEventID int64) *CancelTimerCommand {
17+
return &CancelTimerCommand{
1818
command: command{
1919
state: CommandState_Pending,
2020
id: id,
@@ -23,11 +23,11 @@ func NewCancelTimerCommand(id int64, timerScheduleEventID int64) *cancelTimerCom
2323
}
2424
}
2525

26-
func (*cancelTimerCommand) Type() string {
26+
func (*CancelTimerCommand) Type() string {
2727
return "CancelTimer"
2828
}
2929

30-
func (c *cancelTimerCommand) Commit(clock clock.Clock) *CommandResult {
30+
func (c *CancelTimerCommand) Commit(clock clock.Clock) *CommandResult {
3131
c.commit()
3232

3333
return &CommandResult{

internal/command/sideeffect.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ import (
66
"github.com/cschleiden/go-workflows/internal/payload"
77
)
88

9-
type sideEffectCommand struct {
9+
type SideEffectCommand struct {
1010
command
1111

1212
result payload.Payload
1313
}
1414

15-
var _ Command = (*sideEffectCommand)(nil)
15+
var _ Command = (*SideEffectCommand)(nil)
1616

17-
func NewSideEffectCommand(id int64, result payload.Payload) *sideEffectCommand {
18-
return &sideEffectCommand{
17+
func NewSideEffectCommand(id int64, result payload.Payload) *SideEffectCommand {
18+
return &SideEffectCommand{
1919
command: command{
2020
state: CommandState_Pending,
2121
id: id,
@@ -24,11 +24,11 @@ func NewSideEffectCommand(id int64, result payload.Payload) *sideEffectCommand {
2424
}
2525
}
2626

27-
func (c *sideEffectCommand) Type() string {
27+
func (c *SideEffectCommand) Type() string {
2828
return "SideEffect"
2929
}
3030

31-
func (c *sideEffectCommand) Commit(clock clock.Clock) *CommandResult {
31+
func (c *SideEffectCommand) Commit(clock clock.Clock) *CommandResult {
3232
c.commit()
3333

3434
return &CommandResult{

0 commit comments

Comments
 (0)