apidefaults

package
v0.5.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: PostgreSQL Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package apidefaults owns platform-level API defaults: the pgEdge Starfleet base URL and its resolution rule (flag > profile > default). It sits outside the modules so internal/cli can print effective URLs without importing one; starfleet's conn package re-exports it.

Index

Constants

View Source
const StarfleetAPIURL = "https://api.pgedge.com"

StarfleetAPIURL is the default pgEdge Starfleet API base URL, used when neither the active profile nor --api-url supplies one.

Variables

This section is empty.

Functions

func ResolveStarfleetAPIURL

func ResolveStarfleetAPIURL(ap *config.StarfleetProfile,
	flagAPIURL string) string

ResolveStarfleetAPIURL applies the base-URL precedence.

Types

type Auth0App

type Auth0App struct {
	// Domain is the custom Auth0 domain the /authorize and
	// /oauth/token endpoints live on.
	Domain   string
	Audience string
	// ClientID is the native app's public client ID. Empty means
	// browser sign-in is not available for this API yet.
	ClientID string
}

Auth0App is the public Auth0 configuration browser sign-in uses for one pgEdge Starfleet API.

func Auth0For

func Auth0For(apiURL string) (Auth0App, bool)

Auth0For returns the Auth0 app for apiURL and whether browser sign-in is available for it: the URL is known and its client ID is filled in. A trailing slash is ignored.

Jump to

Keyboard shortcuts

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