Skip to content

Commit 631f090

Browse files
committed
Move core package to internal
1 parent 92fe2f0 commit 631f090

File tree

20 files changed

+29
-27
lines changed

20 files changed

+29
-27
lines changed

backend/backend.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package backend
33
import (
44
"context"
55

6-
"github.com/cschleiden/go-workflows/core"
6+
"github.com/cschleiden/go-workflows/internal/core"
77
"github.com/cschleiden/go-workflows/internal/history"
88
"github.com/cschleiden/go-workflows/internal/task"
99
)

backend/mock_Backend.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/mysql/mysql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"time"
1010

1111
"github.com/cschleiden/go-workflows/backend"
12-
"github.com/cschleiden/go-workflows/core"
12+
"github.com/cschleiden/go-workflows/internal/core"
1313
"github.com/cschleiden/go-workflows/internal/history"
1414
"github.com/cschleiden/go-workflows/internal/task"
1515
_ "github.com/go-sql-driver/mysql"

backend/sqlite/sqlite.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"time"
1010

1111
"github.com/cschleiden/go-workflows/backend"
12-
"github.com/cschleiden/go-workflows/core"
12+
"github.com/cschleiden/go-workflows/internal/core"
1313
"github.com/cschleiden/go-workflows/internal/history"
1414
"github.com/cschleiden/go-workflows/internal/task"
1515
"github.com/google/uuid"

backend/test/backend.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"time"
77

88
"github.com/cschleiden/go-workflows/backend"
9-
"github.com/cschleiden/go-workflows/core"
9+
"github.com/cschleiden/go-workflows/internal/core"
1010
"github.com/cschleiden/go-workflows/internal/history"
1111
"github.com/cschleiden/go-workflows/internal/task"
1212
"github.com/google/uuid"

client/client.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"time"
66

77
"github.com/cschleiden/go-workflows/backend"
8-
"github.com/cschleiden/go-workflows/core"
98
a "github.com/cschleiden/go-workflows/internal/args"
109
"github.com/cschleiden/go-workflows/internal/converter"
10+
"github.com/cschleiden/go-workflows/internal/core"
1111
"github.com/cschleiden/go-workflows/internal/fn"
1212
"github.com/cschleiden/go-workflows/internal/history"
1313
"github.com/cschleiden/go-workflows/workflow"
@@ -20,9 +20,9 @@ type WorkflowInstanceOptions struct {
2020
}
2121

2222
type Client interface {
23-
CreateWorkflowInstance(ctx context.Context, options WorkflowInstanceOptions, wf workflow.Workflow, args ...interface{}) (core.WorkflowInstance, error)
23+
CreateWorkflowInstance(ctx context.Context, options WorkflowInstanceOptions, wf workflow.Workflow, args ...interface{}) (workflow.WorkflowInstance, error)
2424

25-
CancelWorkflowInstance(ctx context.Context, instance core.WorkflowInstance) error
25+
CancelWorkflowInstance(ctx context.Context, instance workflow.WorkflowInstance) error
2626

2727
SignalWorkflow(ctx context.Context, instanceID string, name string, arg interface{}) error
2828
}
@@ -37,7 +37,7 @@ func New(backend backend.Backend) Client {
3737
}
3838
}
3939

40-
func (c *client) CreateWorkflowInstance(ctx context.Context, options WorkflowInstanceOptions, wf workflow.Workflow, args ...interface{}) (core.WorkflowInstance, error) {
40+
func (c *client) CreateWorkflowInstance(ctx context.Context, options WorkflowInstanceOptions, wf workflow.Workflow, args ...interface{}) (workflow.WorkflowInstance, error) {
4141
inputs, err := a.ArgsToInputs(converter.DefaultConverter, args...)
4242
if err != nil {
4343
return nil, errors.Wrap(err, "could not convert arguments")
@@ -65,7 +65,7 @@ func (c *client) CreateWorkflowInstance(ctx context.Context, options WorkflowIns
6565
return wfi, nil
6666
}
6767

68-
func (c *client) CancelWorkflowInstance(ctx context.Context, instance core.WorkflowInstance) error {
68+
func (c *client) CancelWorkflowInstance(ctx context.Context, instance workflow.WorkflowInstance) error {
6969
return c.backend.CancelWorkflowInstance(ctx, instance)
7070
}
7171

File renamed without changes.

internal/history/workflowevent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package history
22

3-
import "github.com/cschleiden/go-workflows/core"
3+
import "github.com/cschleiden/go-workflows/internal/core"
44

55
// WorkflowEvent is a event addressed for a specific workflow instance
66
type WorkflowEvent struct {

internal/task/activity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package task
22

33
import (
4-
"github.com/cschleiden/go-workflows/core"
4+
"github.com/cschleiden/go-workflows/internal/core"
55
"github.com/cschleiden/go-workflows/internal/history"
66
)
77

internal/task/workflow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package task
22

33
import (
4-
"github.com/cschleiden/go-workflows/core"
4+
"github.com/cschleiden/go-workflows/internal/core"
55
"github.com/cschleiden/go-workflows/internal/history"
66
)
77

0 commit comments

Comments
 (0)