mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-13 01:25:11 +00:00
# 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]>
23 lines
684 B
Go
23 lines
684 B
Go
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
|
|
}
|