Documentation
¶
Index ¶
- Constants
- func ConfigMapManifest(p schemas.StorefrontProfile) (map[string]any, error)
- func IsDefaultLogoURL(raw string) bool
- func MarshalProfile(p schemas.StorefrontProfile) (string, error)
- func MergeProfile(base, patch schemas.StorefrontProfile) schemas.StorefrontProfile
- func ParseProfile(raw string) (*schemas.StorefrontProfile, error)
- func ProfileLocalPath(cfg *config.Config) string
- func ReconcileRecorded(cfg *config.Config, u *ui.UI)
- func ResolvePublished(explicit *schemas.StorefrontProfile, baseURL string) schemas.StorefrontProfile
- func ValidateLogoURL(raw string) error
Constants ¶
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 ¶
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 ¶
ProfileLocalPath is the host-side record of the operator profile.
func ReconcileRecorded ¶
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 ¶
ValidateLogoURL accepts absolute http(s) URLs or site-relative paths.
Types ¶
This section is empty.