providers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package providers implements a provider registry pattern for extensible multi-provider support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List() []string

List returns all registered provider names

func NewClient

func NewClient(provider string, config ProviderConfig) (ports.NylasClient, error)

NewClient creates a new provider client by name

func Register

func Register(name string, factory ProviderFactory)

Register registers a provider factory with the default registry Providers should call this in their init() function

Types

type ProviderConfig

type ProviderConfig struct {
	APIKey       string
	ClientID     string
	ClientSecret string
	BaseURL      string
	Region       string
}

ProviderConfig contains configuration for initializing a provider

type ProviderFactory

type ProviderFactory func(config ProviderConfig) (ports.NylasClient, error)

ProviderFactory is a function that creates a new provider client

func Get

func Get(name string) (ProviderFactory, error)

Get returns a provider factory by name

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry maintains a registry of provider factories

Jump to

Keyboard shortcuts

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