config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 3 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

Index

Constants

View Source
const (
	DefaultAuthAPI = "https://api.workos.com"

	// Public AuthKit client IDs (not secrets). Safe to ship in a public CLI.
	StagingClientID = "client_01KC6DJVAFP219V90F6CCQNFYY"
	StagingBaseURL  = "https://main.app.daco.services"

	// ProductionClientID is empty until the production WorkOS binding is checked in.
	ProductionClientID = ""
	ProductionBaseURL  = "https://app.dacolabs.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Env string
	// ClientID is the AuthKit client ID.
	ClientID string
	AuthAPI  string
	// BaseURL is set only when DACO_BASE_URL is present (explicit override).
	BaseURL string
	// DefaultBaseURL comes from DACO_ENV and is used when neither DACO_BASE_URL
	// nor a saved session BaseURL is set.
	DefaultBaseURL string
}

func Load

func Load() (Config, error)

func (Config) RequireBaseURL added in v1.0.0

func (c Config) RequireBaseURL() error

func (Config) RequireClientID added in v1.0.0

func (c Config) RequireClientID() error

func (Config) ResolveBaseURL added in v1.0.0

func (c Config) ResolveBaseURL(sessionBase string) string

ResolveBaseURL prefers an explicit DACO_BASE_URL, then a saved session URL, then env defaults.

Jump to

Keyboard shortcuts

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