revalidation

package
v0.0.0-...-e2f4ec3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package revalidation provides the core logic for the login revalidation worker.

This package is extracted from containers/login-revalidation-worker/main.go to make the worker logic testable from other packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessRow

func ProcessRow(ctx context.Context, db *sql.DB, cfg *Config, row Row) error

ProcessRow checks a single login against GitHub and updates the database. This is the core worker logic extracted from containers/login-revalidation-worker/main.go to make it testable from other packages.

Types

type Client

type Client interface {
	PostResolution(ctx context.Context, email, login string) error
}

Client defines the interface for the queue-api client.

type Config

type Config struct {
	QueueAPIClient Client
	GitHubClient   github.Client
}

Config holds worker configuration.

type Row

type Row struct {
	Email         string
	Login         string
	LastCheckedAt time.Time
	NextCheckAt   *time.Time
	Status        string
	NewLogin      *string
	CheckError    *string
	CreatedAt     time.Time
}

Row represents a row from the email_revalidation table.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL