feat: ci/cd

This commit is contained in:
Giovanni Rezcjikov
2026-03-09 12:50:29 +03:00
parent f4e4fb21e3
commit daaa702dad
21 changed files with 585 additions and 267 deletions
@@ -37,6 +37,7 @@ type OAuthRepo interface {
CreateRefreshToken(ctx context.Context, row models.RefreshTokenRow) (*models.RefreshTokenRow, error)
GetRefreshTokenByHash(ctx context.Context, tokenHash string) (*models.RefreshTokenRow, error)
DeleteRefreshTokenByID(ctx context.Context, id uuid.UUID) error
DeleteRefreshTokensByUserID(ctx context.Context, userID uuid.UUID) error
RecordUserConsent(ctx context.Context, userID, clientID uuid.UUID, scopes []string) error
GetUserConsents(ctx context.Context, userID uuid.UUID) ([]models.UserConsent, error)
UpdateConsentLastUsed(ctx context.Context, userID, clientID uuid.UUID) error
@@ -55,11 +56,10 @@ type ClientAuth struct {
}
type Service struct {
users UserRepo
oauth OAuthRepo
redis *redis.Client
tokens TokenConfig
basicClient *models.OAuthClient
users UserRepo
oauth OAuthRepo
redis *redis.Client
tokens TokenConfig
}
func New(
@@ -67,14 +67,12 @@ func New(
oauth OAuthRepo,
rdb *redis.Client,
tokenCfg TokenConfig,
basicClient *models.OAuthClient,
) *Service {
return &Service{
users: users,
oauth: oauth,
redis: rdb,
tokens: tokenCfg,
basicClient: basicClient,
users: users,
oauth: oauth,
redis: rdb,
tokens: tokenCfg,
}
}