storefront

package
v0.12.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProfileNamespace = "x402"
	ProfileConfigMap = "obol-storefront-profile"
	ProfileDataKey   = "profile.json"
	DefaultLogoPath  = "/obol-stack-logo.png"
)

Variables

This section is empty.

Functions

func ConfigMapManifest

func ConfigMapManifest(p schemas.StorefrontProfile) (map[string]any, error)

ConfigMapManifest returns a kubectl-applyable ConfigMap for the profile.

func IsDefaultLogoURL

func IsDefaultLogoURL(raw string) bool

IsDefaultLogoURL reports whether url is the stack default wordmark (relative or absolute).

func MarshalProfile

func MarshalProfile(p schemas.StorefrontProfile) (string, error)

MarshalProfile serialises a profile for ConfigMap storage.

func MergeProfile

func MergeProfile(base, patch schemas.StorefrontProfile) schemas.StorefrontProfile

MergeProfile overlays non-empty patch fields onto base.

func ParseProfile

func ParseProfile(raw string) (*schemas.StorefrontProfile, error)

ParseProfile decodes profile JSON from a ConfigMap data key.

func ProfileLocalPath

func ProfileLocalPath(cfg *config.Config) string

ProfileLocalPath is the host-side record of the operator profile.

func ReconcileRecorded

func ReconcileRecorded(cfg *config.Config, u *ui.UI)

ReconcileRecorded re-applies the operator's recorded storefront branding into the cluster during `obol stack up`.

`obol sell info set` writes the profile to both the x402/obol-storefront-profile ConfigMap (etcd, destroyed by `obol stack down`) and a host-side record at $CONFIG_DIR/storefront/profile.json (survives cluster recreation). Without this replay a fresh `stack up` would come back with the branding on disk but no matching ConfigMap, so the controller would publish the default catalog envelope.

The host file is the source of truth. No record on disk => nothing to do. Best-effort: a failure warns but never blocks stack-up.

func ResolvePublished

func ResolvePublished(explicit *schemas.StorefrontProfile, baseURL string) schemas.StorefrontProfile

ResolvePublished merges an operator-set profile over stack defaults.

func ValidateLogoURL

func ValidateLogoURL(raw string) error

ValidateLogoURL accepts absolute http(s) URLs or site-relative paths.

Types

This section is empty.

Jump to

Keyboard shortcuts

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