Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindAvailablePort ¶
FindAvailablePort finds an available port in the given range.
func OpenBrowser ¶
OpenBrowser opens the default browser to the given URL.
func SetServices ¶
func SetServices(s *Services)
SetServices injects service implementations for CLI commands.
func SetTUIConfig ¶
func SetTUIConfig(config *TUIConfig)
SetTUIConfig sets the configuration for the TUI command.
Types ¶
type OAuthCallbackServer ¶
type OAuthCallbackServer struct {
// contains filtered or unexported fields
}
OAuthCallbackServer handles OAuth redirect callbacks. It starts a local HTTP server to receive the authorization code.
func NewOAuthCallbackServer ¶
func NewOAuthCallbackServer(port int, expectedState string) *OAuthCallbackServer
NewOAuthCallbackServer creates a new OAuth callback server. The expectedState is used to validate the callback matches the request.
func (*OAuthCallbackServer) Port ¶
func (s *OAuthCallbackServer) Port() int
Port returns the port the server is listening on.
func (*OAuthCallbackServer) RedirectURI ¶
func (s *OAuthCallbackServer) RedirectURI() string
RedirectURI returns the redirect URI for this callback server.
func (*OAuthCallbackServer) Start ¶
func (s *OAuthCallbackServer) Start() error
Start starts the callback server on the configured port.
func (*OAuthCallbackServer) Stop ¶
func (s *OAuthCallbackServer) Stop() error
Stop shuts down the callback server.
func (*OAuthCallbackServer) WaitForCode ¶
func (s *OAuthCallbackServer) WaitForCode(timeout time.Duration) (string, error)
WaitForCode blocks until the authorization code is received or timeout.
type Services ¶
type Services struct {
Search driving.SearchService
Source driving.SourceService
Sync driving.SyncOrchestrator
Document driving.DocumentService
ConnectorRegistry driving.ConnectorRegistry
ProviderRegistry driving.ProviderRegistry
Settings driving.SettingsService
AuthProvider driving.AuthProviderService
Credentials driving.CredentialsService
}
Services holds configuration for CLI commands.
type TUIConfig ¶
type TUIConfig struct {
SearchService driving.SearchService
SourceService driving.SourceService
SyncOrchestrator driving.SyncOrchestrator
ResultActionService driving.ResultActionService
DocumentService driving.DocumentService
ConnectorRegistry driving.ConnectorRegistry
ProviderRegistry driving.ProviderRegistry
SettingsService driving.SettingsService
CredentialsService driving.CredentialsService
AuthProviderService driving.AuthProviderService
Scheduler driving.Scheduler
SchedulerConfig domain.SchedulerConfig
}
TUIConfig holds configuration for the TUI command.