servicecatalog

package
v0.55.16 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package servicecatalog normalizes StackKit service identity across CUE, the Admin registry snapshot, generated URLs, and kombify.me registration.

Index

Constants

View Source
const (
	IdentityPolicyNone        = "none"
	IdentityPolicyForwardAuth = "forwardauth"
	IdentityPolicyOIDC        = "oidc"
	IdentityPolicyProvider    = "provider"
	IdentityPolicySelfAuth    = "self-auth"

	OwnerProvisioningNone     = "none"
	OwnerProvisioningRequired = "required"

	SetupPolicyManual    = "manual"
	SetupPolicyOnDemand  = "on_demand"
	SetupPolicyAutomatic = "automatic"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Delivery

type Delivery struct {
	ManagedBy string `json:"managedBy,omitempty"`
}

type Service

type Service struct {
	Key                     string               `json:"key"`
	Name                    string               `json:"name"`
	DisplayName             string               `json:"display_name"`
	Description             string               `json:"description,omitempty"`
	ToolName                string               `json:"tool_name"`
	ModuleSlug              string               `json:"module_slug"`
	Role                    string               `json:"role,omitempty"`
	DefaultTool             string               `json:"default_tool,omitempty"`
	Alternatives            []string             `json:"alternatives,omitempty"`
	LocalSlug               string               `json:"local_slug"`
	PublicSlug              string               `json:"public_slug"`
	LegacyAliases           []string             `json:"legacy_aliases,omitempty"`
	IdentityPolicy          string               `json:"identity_policy"`
	OwnerProvisioningPolicy string               `json:"owner_provisioning_policy"`
	Icon                    string               `json:"icon,omitempty"`
	LogoURL                 string               `json:"logo_url,omitempty"`
	Badge                   string               `json:"badge,omitempty"`
	Layer                   string               `json:"layer,omitempty"`
	Section                 string               `json:"section,omitempty"`
	Order                   int                  `json:"order,omitempty"`
	EnableVar               string               `json:"enable_var,omitempty"`
	GuideURL                string               `json:"guide_url,omitempty"`
	Clients                 []registry.AppClient `json:"clients,omitempty"`
	Vendor                  *registry.AppVendor  `json:"vendor,omitempty"`
	SetupPolicy             string               `json:"setup_policy,omitempty"`
	SetupActionLabel        string               `json:"setup_action_label,omitempty"`
	Delivery                Delivery             `json:"delivery,omitempty"`
	BootstrapProvider       string               `json:"bootstrap_provider,omitempty"`
	Default                 bool                 `json:"default"`

	// Template-compat fields used by the existing monolithic Base Kit template.
	// They intentionally mirror LocalSlug/PublicSlug until the template is fully
	// generated from the registry service shape.
	Nested string `json:"-"`
	Flat   string `json:"-"`
}

Service is the canonical service-facing identity for one exposed StackKit endpoint. Tool and module names describe implementation; Key and slugs describe the product URL contract.

func Default

func Default() []Service

Default returns the OSS-safe canonical service catalog used when the Admin registry is unavailable or its snapshot predates the services projection.

func FromCUE

func FromCUE(entries []cueval.CatalogEntry) []Service

FromCUE overlays CUE module dashboard metadata onto the canonical service identity. CUE remains authoritative for behavior; this package normalizes product-facing names and route slugs.

func FromRegistry

func FromRegistry(entries []registry.Service) []Service

FromRegistry converts the Admin registry service projection into the generator/catalog shape. Empty registry data returns nil so callers can cleanly fall back to CUE/defaults.

func WithDefaultFallbacks

func WithDefaultFallbacks(services []Service) []Service

WithDefaultFallbacks merges default catalog metadata into a partial catalog and appends default services that are missing entirely.

Jump to

Keyboard shortcuts

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