auth

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package auth provides authentication checking for AI model providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker struct {
}

Checker checks authentication status for providers.

func NewChecker

func NewChecker() *Checker

NewChecker creates a new authentication checker.

func (*Checker) CheckProvider

func (c *Checker) CheckProvider(provider *catalogs.Provider, supportedMap map[string]bool) *Status

CheckProvider checks the authentication status of a provider.

type GCloudStatus

type GCloudStatus struct {
	Authenticated     bool
	Project           string
	Location          string
	HasVertexProvider bool
}

GCloudStatus represents Google Cloud authentication status.

type GoogleVertexDetails added in v0.0.16

type GoogleVertexDetails struct {
	State          State
	Type           string    // "user" | "service_account"
	Account        string    // Email address
	Project        string    // Project ID
	ProjectSource  string    // "ADC" | "env" | "gcloud config" | "not set"
	Location       string    // Region
	LocationSource string    // "env" | "gcloud config" | "default"
	UniverseDomain string    // Usually "googleapis.com"
	ADCPath        string    // File path
	LastAuth       time.Time // File modification time
	ErrorMessage   string    // For invalid/missing states
}

GoogleVertexDetails contains detailed Google Vertex AI authentication information.

type State

type State int

State represents the authentication state of a provider.

const (
	// StateConfigured means the provider has credentials configured.
	StateConfigured State = iota
	// StateMissing means required credentials are missing.
	StateMissing
	// StateInvalid means credentials are found but malformed or invalid.
	StateInvalid
	// StateOptional means the provider has optional or no auth requirements.
	StateOptional
	// StateUnsupported means the provider has no client implementation.
	StateUnsupported
)

type Status

type Status struct {
	State   State
	Details string
	Extra   interface{} // Provider-specific detailed data
}

Status represents the authentication status of a provider.

Jump to

Keyboard shortcuts

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