provider

package
v0.0.25 Latest Latest
Warning

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

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

Documentation

Overview

Package provider provides common provider operations for CLI commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterWithClients

func FilterWithClients(providers []*catalogs.Provider, hasClientFunc func(catalogs.ProviderID) bool) []*catalogs.Provider

FilterWithClients returns only providers that have API client implementations. Used by commands that need to work with multiple providers that have clients.

func Get

func Get(catalog catalogs.Catalog, providerID string) (*catalogs.Provider, error)

Get retrieves a provider by ID or alias from the catalog. This handles the common pattern of provider lookup with proper error handling. Silently resolves aliases to canonical provider IDs.

func GetWithValidation

func GetWithValidation(catalog catalogs.Catalog, providerID string, hasClientFunc func(catalogs.ProviderID) bool) (*catalogs.Provider, error)

GetWithValidation retrieves a provider and validates it has a client implementation. Used by commands that need to interact with provider APIs.

func List

func List(catalog catalogs.Catalog) []*catalogs.Provider

List returns all providers from the catalog. Convenience function for consistent provider listing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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