template-monorepo/internal/model/member/domain/repository/identity.go

16 lines
536 B
Go
Raw Permalink Normal View History

2026-05-20 23:51:22 +00:00
package repository
import (
"context"
"gateway/internal/model/member/domain/entity"
)
// IdentityRepository persists zitadel_sub / external_id to uid mappings.
type IdentityRepository interface {
Insert(ctx context.Context, identity *entity.Identity) error
GetByZitadelUserID(ctx context.Context, tenantID, zitadelUserID string) (*entity.Identity, error)
GetByExternalID(ctx context.Context, tenantID, externalID string) (*entity.Identity, error)
GetByUID(ctx context.Context, tenantID, uid string) (*entity.Identity, error)
}