Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: replace packr2 with pkger fork
- Loading branch information
Showing
16 changed files
with
167 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,17 @@ | ||
package password | ||
|
||
import ( | ||
"github.com/gobuffalo/packr/v2" | ||
"github.com/markbates/pkger" | ||
|
||
"github.com/ory/kratos/x" | ||
) | ||
|
||
var schemas = packr.New(".schema", ".schema") | ||
var _ = pkger.Dir("/selfservice/strategy/password/.schema") | ||
|
||
var loginSchema, registrationSchema, settingsSchema []byte | ||
|
||
func init() { | ||
var err error | ||
loginSchema, err = schemas.Find("login.schema.json") | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
registrationSchema, err = schemas.Find("registration.schema.json") | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
settingsSchema, err = schemas.Find("settings.schema.json") | ||
if err != nil { | ||
panic(err) | ||
} | ||
loginSchema = x.MustPkgerRead(pkger.Open("/selfservice/strategy/password/.schema/login.schema.json")) | ||
registrationSchema = x.MustPkgerRead(pkger.Open("/selfservice/strategy/password/.schema/registration.schema.json")) | ||
settingsSchema = x.MustPkgerRead(pkger.Open("/selfservice/strategy/password/.schema/settings.schema.json")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
package x | ||
|
||
import ( | ||
"github.com/gobuffalo/packr/v2" | ||
"github.com/markbates/pkger" | ||
|
||
"github.com/ory/x/logrusx" | ||
"github.com/ory/x/viperx" | ||
) | ||
|
||
var schemas = packr.New("schemas", "../.schema") | ||
var schema = MustPkgerRead(pkger.Open("/.schema/config.schema.json")) | ||
|
||
func WatchAndValidateViper(log *logrusx.Logger) { | ||
schema, err := schemas.Find("config.schema.json") | ||
if err != nil { | ||
log.WithError(err).Fatal("Unable to open configuration JSON Schema.") | ||
} | ||
|
||
viperx.WatchAndValidateViper(log, schema, "ORY Kratos", []string{"serve", "profiling", "log"}, "") | ||
} |
Oops, something went wrong.