Skip to content

Commit 5d05b34

Browse files
committed
Move from pkg to root
1 parent 7523acf commit 5d05b34

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+174
-174
lines changed

pkg/backend/backend.go renamed to backend/backend.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package backend
33
import (
44
"context"
55

6-
"github.com/cschleiden/go-workflows/pkg/core"
7-
"github.com/cschleiden/go-workflows/pkg/core/task"
8-
"github.com/cschleiden/go-workflows/pkg/history"
6+
"github.com/cschleiden/go-workflows/core"
7+
"github.com/cschleiden/go-workflows/core/task"
8+
"github.com/cschleiden/go-workflows/history"
99
)
1010

1111
//go:generate mockery --name=Backend --inpackage

pkg/backend/mock_Backend.go renamed to backend/mock_Backend.go

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

pkg/backend/mysql/events.go renamed to backend/mysql/events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"database/sql"
66
"strings"
77

8-
"github.com/cschleiden/go-workflows/pkg/history"
8+
"github.com/cschleiden/go-workflows/history"
99
)
1010

1111
func insertNewEvents(ctx context.Context, tx *sql.Tx, instanceID string, newEvents []history.Event) error {

pkg/backend/mysql/mysql.go renamed to backend/mysql/mysql.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import (
88
"strings"
99
"time"
1010

11-
"github.com/cschleiden/go-workflows/pkg/backend"
12-
"github.com/cschleiden/go-workflows/pkg/core"
13-
"github.com/cschleiden/go-workflows/pkg/core/task"
14-
"github.com/cschleiden/go-workflows/pkg/history"
11+
"github.com/cschleiden/go-workflows/backend"
12+
"github.com/cschleiden/go-workflows/core"
13+
"github.com/cschleiden/go-workflows/core/task"
14+
"github.com/cschleiden/go-workflows/history"
1515
_ "github.com/go-sql-driver/mysql"
1616
"github.com/google/uuid"
1717
"github.com/pkg/errors"

pkg/backend/mysql/mysql_test.go renamed to backend/mysql/mysql_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"strings"
77
"testing"
88

9-
"github.com/cschleiden/go-workflows/pkg/backend"
10-
"github.com/cschleiden/go-workflows/pkg/backend/test"
9+
"github.com/cschleiden/go-workflows/backend"
10+
"github.com/cschleiden/go-workflows/backend/test"
1111
"github.com/google/uuid"
1212
"github.com/pkg/errors"
1313
)
File renamed without changes.
File renamed without changes.

pkg/backend/sqlite/activities.go renamed to backend/sqlite/activities.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"database/sql"
66

7-
"github.com/cschleiden/go-workflows/pkg/history"
7+
"github.com/cschleiden/go-workflows/history"
88
)
99

1010
func scheduleActivity(ctx context.Context, tx *sql.Tx, instanceID, executionID string, event history.Event) error {

pkg/backend/sqlite/events.go renamed to backend/sqlite/events.go

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

9-
"github.com/cschleiden/go-workflows/pkg/history"
9+
"github.com/cschleiden/go-workflows/history"
1010
"github.com/pkg/errors"
1111
)
1212

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
CREATE TABLE IF NOT EXISTS `instances` (
2-
`id` TEXT PRIMARY KEY,
3-
`execution_id` TEXT NO NULL,
4-
`parent_instance_id` TEXT NULL,
5-
`parent_schedule_event_id` INTEGER NULL,
6-
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
7-
`completed_at` DATETIME NULL,
8-
`locked_until` DATETIME NULL,
9-
`sticky_until` DATETIME NULL,
10-
`worker` TEXT NULL
11-
12-
);
13-
14-
CREATE INDEX IF NOT EXISTS `idx_instances_locked_until_completed_at` ON `instances` (`locked_until`, `sticky_until`, `completed_at`, `worker`);
15-
CREATE INDEX IF NOT EXISTS `idx_instances_parent_instance_id` ON `instances` (`parent_instance_id`);
16-
17-
CREATE TABLE IF NOT EXISTS `pending_events` (
18-
`id` TEXT PRIMARY KEY,
19-
`instance_id` TEXT NOT NULL,
20-
`event_type` INTEGER NOT NULL,
21-
`timestamp` DATETIME NOT NULL,
22-
`schedule_event_id` INT NOT NULL,
23-
`attributes` BLOB NOT NULL,
24-
`visible_at` DATETIME NULL
25-
);
26-
27-
CREATE TABLE IF NOT EXISTS `history` (
28-
`id` TEXT PRIMARY KEY,
29-
`instance_id` TEXT NOT NULL,
30-
`event_type` INTEGER NOT NULL,
31-
`timestamp` DATETIME NOT NULL,
32-
`schedule_event_id` INT NOT NULL,
33-
`attributes` BLOB NOT NULL,
34-
`visible_at` DATETIME NULL
35-
);
36-
37-
CREATE TABLE IF NOT EXISTS `activities` (
38-
`id` TEXT PRIMARY KEY,
39-
`instance_id` TEXT NOT NULL,
40-
`execution_id` TEXT NOT NULL,
41-
`event_type` INTEGER NOT NULL,
42-
`timestamp` DATETIME NOT NULL,
43-
`schedule_event_id` INT NOT NULL,
44-
`attributes` BLOB NOT NULL,
45-
`visible_at` DATETIME NULL,
46-
`locked_until` DATETIME NULL,
47-
`worker` TEXT NULL
1+
CREATE TABLE IF NOT EXISTS `instances` (
2+
`id` TEXT PRIMARY KEY,
3+
`execution_id` TEXT NO NULL,
4+
`parent_instance_id` TEXT NULL,
5+
`parent_schedule_event_id` INTEGER NULL,
6+
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
7+
`completed_at` DATETIME NULL,
8+
`locked_until` DATETIME NULL,
9+
`sticky_until` DATETIME NULL,
10+
`worker` TEXT NULL
11+
12+
);
13+
14+
CREATE INDEX IF NOT EXISTS `idx_instances_locked_until_completed_at` ON `instances` (`locked_until`, `sticky_until`, `completed_at`, `worker`);
15+
CREATE INDEX IF NOT EXISTS `idx_instances_parent_instance_id` ON `instances` (`parent_instance_id`);
16+
17+
CREATE TABLE IF NOT EXISTS `pending_events` (
18+
`id` TEXT PRIMARY KEY,
19+
`instance_id` TEXT NOT NULL,
20+
`event_type` INTEGER NOT NULL,
21+
`timestamp` DATETIME NOT NULL,
22+
`schedule_event_id` INT NOT NULL,
23+
`attributes` BLOB NOT NULL,
24+
`visible_at` DATETIME NULL
25+
);
26+
27+
CREATE TABLE IF NOT EXISTS `history` (
28+
`id` TEXT PRIMARY KEY,
29+
`instance_id` TEXT NOT NULL,
30+
`event_type` INTEGER NOT NULL,
31+
`timestamp` DATETIME NOT NULL,
32+
`schedule_event_id` INT NOT NULL,
33+
`attributes` BLOB NOT NULL,
34+
`visible_at` DATETIME NULL
35+
);
36+
37+
CREATE TABLE IF NOT EXISTS `activities` (
38+
`id` TEXT PRIMARY KEY,
39+
`instance_id` TEXT NOT NULL,
40+
`execution_id` TEXT NOT NULL,
41+
`event_type` INTEGER NOT NULL,
42+
`timestamp` DATETIME NOT NULL,
43+
`schedule_event_id` INT NOT NULL,
44+
`attributes` BLOB NOT NULL,
45+
`visible_at` DATETIME NULL,
46+
`locked_until` DATETIME NULL,
47+
`worker` TEXT NULL
4848
);

0 commit comments

Comments
 (0)