localconfig

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIBaseURL

func APIBaseURL(appURL string) string

APIBaseURL derives the Obot API base URL from a normalized app URL.

func ActiveAppURL

func ActiveAppURL(explicit string) (string, error)

ActiveAppURL resolves the active app URL using an explicit value first, then the stored default URL.

func NormalizeAppURL

func NormalizeAppURL(raw string) (string, error)

NormalizeAppURL returns the canonical Obot app URL used for local config and keyring lookup.

func Save

func Save(cfg Config) error

Save writes the setup-managed CLI config to XDG config storage.

Types

type Config

type Config struct {
	DefaultURL string `json:"defaultURL,omitempty"`
}

Config is the setup-managed CLI configuration written under the user's XDG config directory.

func Load

func Load() (Config, error)

Load reads the setup-managed CLI config from XDG config storage.

type Store

type Store interface {
	Load() (Config, error)
	Save(Config) error
}

Store is the local configuration storage boundary.

Jump to

Keyboard shortcuts

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