migrate

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package migrate provides domain logic for migrating built-in auth handlers to plugin-based handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FetchFunc

type FetchFunc func(ctx context.Context, deps []solution.PluginDependency) ([]plugin.FetchResult, error)

FetchFunc is the signature for the function that fetches plugins.

type Result

type Result struct {
	Name         string `json:"name"         yaml:"name"`
	PluginSource string `json:"pluginSource" yaml:"pluginSource"`
	TokenMessage string `json:"tokenMessage" yaml:"tokenMessage"`
	Status       Status `json:"status"       yaml:"status"`
	ErrorMessage string `json:"errorMessage,omitempty" yaml:"errorMessage,omitempty"`
}

Result holds the migration result for a single handler.

func Handlers

func Handlers(ctx context.Context, officialReg *authofficial.Registry, authReg *auth.Registry, fetchFn FetchFunc) []Result

Handlers performs the migration for all official auth handlers. It fetches plugin binaries via fetchFn and validates cached token accessibility for each handler.

func (*Result) IsReady

func (r *Result) IsReady() bool

IsReady returns true if the result indicates a successful migration.

func (*Result) StatusString

func (r *Result) StatusString() string

StatusString returns the status as a string for display.

type Status

type Status string

Status represents the migration status of a single handler.

const (
	// StatusReady indicates the handler is fully migrated and ready.
	StatusReady Status = "READY"

	// StatusFailed indicates the handler migration failed.
	StatusFailed Status = "FAILED"
)

Jump to

Keyboard shortcuts

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