config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRedirectURI = "http://localhost:8080/callback"

Variables

This section is empty.

Functions

func ResolveRedirectURI added in v1.1.0

func ResolveRedirectURI(appName string) (value string, fromEnv bool, source string)

ResolveRedirectURI resolves the effective redirect URI for an app. Precedence: REDIRECT_URI env var, then stored app config, then built-in default.

Types

type Config

type Config struct {
	// OAuth2 client tokens (may come from env vars or the active app in .xurl)
	ClientID     string
	ClientSecret string
	// OAuth2 PKCE flow urls
	RedirectURI string
	// RedirectURIFromEnv tracks whether REDIRECT_URI came from the environment.
	RedirectURIFromEnv bool
	AuthURL            string
	TokenURL           string
	// API base url
	APIBaseURL string
	// API user info url
	InfoURL string
	// AppName is the explicit --app override; empty means "use default".
	AppName string
}

Config holds the application configuration

func NewConfig

func NewConfig() *Config

NewConfig creates a new Config from environment variables

func NewConfigForApp added in v1.1.0

func NewConfigForApp(appName string) *Config

NewConfigForApp creates a Config for the given app name.

Jump to

Keyboard shortcuts

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