-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
definitions.go
48 lines (39 loc) · 1.05 KB
/
definitions.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright © 2022 Ory Corp
// SPDX-License-Identifier: Apache-2.0
package persistence
import (
"context"
"github.com/gofrs/uuid"
"github.com/ory/x/networkx"
"github.com/gobuffalo/pop/v6"
"github.com/ory/hydra/v2/client"
"github.com/ory/hydra/v2/consent"
"github.com/ory/hydra/v2/jwk"
"github.com/ory/hydra/v2/oauth2/trust"
"github.com/ory/hydra/v2/x"
"github.com/ory/x/popx"
)
type (
Persister interface {
consent.Manager
client.Manager
x.FositeStorer
jwk.Manager
trust.GrantManager
MigrationStatus(ctx context.Context) (popx.MigrationStatuses, error)
MigrateDown(context.Context, int) error
MigrateUp(context.Context) error
PrepareMigration(context.Context) error
Connection(context.Context) *pop.Connection
Transaction(context.Context, func(ctx context.Context, c *pop.Connection) error) error
Ping(context.Context) error
Networker
}
Provider interface {
Persister() Persister
}
Networker interface {
NetworkID(ctx context.Context) uuid.UUID
DetermineNetwork(ctx context.Context) (*networkx.Network, error)
}
)