Keystone read APIs and repository state#7
Conversation
| config: cfg, | ||
| repositories: repositories, | ||
| } | ||
| service.SeedDefaults() |
There was a problem hiding this comment.
Seeding defaults in the repository-backed constructor makes Keystone state available to both memory and SQLite implementations. That is why identity moves to repositories before the broader service expansion.
| } | ||
| } | ||
|
|
||
| func (s Service) Reset() { |
There was a problem hiding this comment.
Reset clears repository state and then reseeds defaults. This keeps test reset behavior deterministic while still allowing durable repositories to start from explicit stored state later.
| } | ||
| } | ||
|
|
||
| func (s Service) defaultEndpoints() []EndpointDefinition { |
There was a problem hiding this comment.
The default catalog paths are the bridge between Keystone and every mounted service router. When service route prefixes change, this is the file that must change with them.
| panic(fmt.Errorf("marshal identity token: %w", err)) | ||
| } | ||
|
|
||
| _, err = r.db.Exec( |
There was a problem hiding this comment.
Tokens are upserted instead of inserted once. That keeps the repository tolerant of repeated seed/test flows while still storing the complete issued token payload.
c9c3ad2 to
45e072e
Compare
9275327 to
7e58142
Compare
Summary
Main Review Points
Verification