@@ -7,45 +7,39 @@ import (
7
7
"context"
8
8
"io/fs"
9
9
10
- "github.com/ory/kratos/selfservice/sessiontokenexchange"
11
- "github.com/ory/x/contextx"
12
- "github.com/ory/x/jsonnetsecure"
13
- "github.com/ory/x/otelx"
14
- prometheus "github.com/ory/x/prometheusx"
15
-
16
10
"github.com/gorilla/sessions"
17
11
"github.com/pkg/errors"
18
12
19
- "github.com/ory/nosurf"
20
-
21
- "github.com/ory/x/logrusx"
22
-
13
+ "github.com/ory/kratos/cipher"
23
14
"github.com/ory/kratos/continuity"
24
15
"github.com/ory/kratos/courier"
16
+ "github.com/ory/kratos/driver/config"
25
17
"github.com/ory/kratos/hash"
18
+ "github.com/ory/kratos/identity"
19
+ "github.com/ory/kratos/persistence"
26
20
"github.com/ory/kratos/schema"
21
+ "github.com/ory/kratos/selfservice/errorx"
22
+ "github.com/ory/kratos/selfservice/flow/login"
23
+ "github.com/ory/kratos/selfservice/flow/logout"
27
24
"github.com/ory/kratos/selfservice/flow/recovery"
25
+ "github.com/ory/kratos/selfservice/flow/registration"
28
26
"github.com/ory/kratos/selfservice/flow/settings"
29
27
"github.com/ory/kratos/selfservice/flow/verification"
28
+ "github.com/ory/kratos/selfservice/sessiontokenexchange"
30
29
"github.com/ory/kratos/selfservice/strategy/code"
31
30
"github.com/ory/kratos/selfservice/strategy/link"
32
-
33
- "github.com/ory/x/healthx"
34
-
35
- "github.com/ory/kratos/persistence"
36
- "github.com/ory/kratos/selfservice/flow/login"
37
- "github.com/ory/kratos/selfservice/flow/logout"
38
- "github.com/ory/kratos/selfservice/flow/registration"
39
-
40
- "github.com/ory/kratos/x"
41
-
42
- "github.com/ory/x/dbal"
43
-
44
- "github.com/ory/kratos/driver/config"
45
- "github.com/ory/kratos/identity"
46
- "github.com/ory/kratos/selfservice/errorx"
47
31
password2 "github.com/ory/kratos/selfservice/strategy/password"
48
32
"github.com/ory/kratos/session"
33
+ "github.com/ory/kratos/x"
34
+ "github.com/ory/nosurf"
35
+ "github.com/ory/x/contextx"
36
+ "github.com/ory/x/dbal"
37
+ "github.com/ory/x/healthx"
38
+ "github.com/ory/x/jsonnetsecure"
39
+ "github.com/ory/x/logrusx"
40
+ "github.com/ory/x/otelx"
41
+ "github.com/ory/x/popx"
42
+ prometheus "github.com/ory/x/prometheusx"
49
43
)
50
44
51
45
type Registry interface {
@@ -85,6 +79,8 @@ type Registry interface {
85
79
continuity.ManagementProvider
86
80
continuity.PersistenceProvider
87
81
82
+ cipher.Provider
83
+
88
84
courier.Provider
89
85
90
86
persistence.Provider
@@ -186,10 +182,12 @@ type options struct {
186
182
replaceIdentitySchemaProvider func (Registry ) schema.IdentitySchemaProvider
187
183
inspect func (Registry ) error
188
184
extraMigrations []fs.FS
189
- replacementStrategies []NewStrategy
190
- extraHooks map [string ]func (config.SelfServiceHook ) any
191
- disableMigrationLogging bool
192
- jsonnetPool jsonnetsecure.Pool
185
+ extraGoMigrations popx.Migrations
186
+
187
+ replacementStrategies []NewStrategy
188
+ extraHooks map [string ]func (config.SelfServiceHook ) any
189
+ disableMigrationLogging bool
190
+ jsonnetPool jsonnetsecure.Pool
193
191
}
194
192
195
193
type RegistryOption func (* options )
@@ -251,6 +249,12 @@ func WithExtraMigrations(m ...fs.FS) RegistryOption {
251
249
}
252
250
}
253
251
252
+ func WithExtraGoMigrations (m ... popx.Migration ) RegistryOption {
253
+ return func (o * options ) {
254
+ o .extraGoMigrations = append (o .extraGoMigrations , m ... )
255
+ }
256
+ }
257
+
254
258
func WithDisabledMigrationLogging () RegistryOption {
255
259
return func (o * options ) {
256
260
o .disableMigrationLogging = true
0 commit comments