factory

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package factory constructs a provider.Provider from a config entry + OS keyring. Lives in its own package so concrete provider packages don't create an import cycle with the provider package that defines the Provider interface.

Index

Constants

View Source
const DefaultAlaskaBaseURL = "https://api.arcbilling.tech/v1"

DefaultAlaskaBaseURL is the production Alaska API endpoint. Used when the user hasn't set a providers.<name>.base_url in config and ALASKA_API_URL is empty. Precedence: config.base_url > env > default.

View Source
const EnvAlaskaURL = "ALASKA_API_URL"

EnvAlaskaURL lets users pin the Alaska API base URL outside the config file, handy for swapping staging / self-hosted environments without editing TOML.

Variables

This section is empty.

Functions

func Build

func Build(_ context.Context, cfg *config.Config, name string) (provider.Provider, error)

Build returns a ready-to-use Provider for the named entry in cfg.Providers. It fetches the API key from the OS keyring and dispatches on pc.Type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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