mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-05 10:28:52 +00:00
feat(relational): define session repository (#11054)
# Which Problems Are Solved As part moving sessions to the relational table, the repository to be able to manage session needs to be defined. This allows the business logic / service-layer to implement the necessary commands and the storage-layer to implement the underlying repository. # How the Problems Are Solved This PR defines the `SessionRepository` with all underlying object like the user agent, metadata, factors (including. challenges). # Additional Changes None # Additional Context - relates to #10212 --------- Co-authored-by: Copilot <[email protected]>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package domain
|
||||
|
||||
import "github.com/zitadel/zitadel/backend/v3/storage/database"
|
||||
|
||||
type SessionMetadata struct {
|
||||
Metadata
|
||||
SessionID string `json:"sessionId,omitempty" db:"session_id"`
|
||||
}
|
||||
|
||||
type sessionMetadataColumns interface {
|
||||
MetadataColumns
|
||||
// SessionIDColumn returns the column for the session id field.
|
||||
SessionIDColumn() database.Column
|
||||
}
|
||||
|
||||
type sessionMetadataConditions interface {
|
||||
MetadataConditions
|
||||
// PrimaryKeyCondition returns a filter on the primary key fields.
|
||||
PrimaryKeyCondition(instanceID, sessionID, key string) database.Condition
|
||||
// SessionIDCondition returns an equal filter on the session id field.
|
||||
SessionIDCondition(sessionID string) database.Condition
|
||||
}
|
||||
Reference in New Issue
Block a user