Documentation
¶
Overview ¶
Package domain defines core business types and category enums for the toolkit application.
Index ¶
- Variables
- func Aliases() []string
- func FilterByFilterable[T models.NamedFilterable](items []T, filter string) []T
- func FilterEnvironments(envs []models.Environment, filter string) []models.Environment
- func FilterServiceTenancies(tenancies []models.ServiceTenancy, filter string) []models.ServiceTenancy
- func FilterTenants(tenants []models.Tenant, filter string) []models.Tenant
- type Category
- type ToolkitContext
Constants ¶
This section is empty.
Variables ¶
var ErrUnknownCategory = errors.New("unknown category")
ErrUnknownCategory is returned when a string cannot be parsed into a known Category.
Functions ¶
func Aliases ¶
func Aliases() []string
Aliases returns all canonical alias strings for autocomplete, etc.
func FilterByFilterable ¶
func FilterByFilterable[T models.NamedFilterable](items []T, filter string) []T
FilterByFilterable returns a filtered slice of items matching the provided filter string. T must implement models.NamedFilterable.
func FilterEnvironments ¶
func FilterEnvironments(envs []models.Environment, filter string) []models.Environment
FilterEnvironments returns a filtered slice of Environment matching the provided filter string.
func FilterServiceTenancies ¶
func FilterServiceTenancies(tenancies []models.ServiceTenancy, filter string) []models.ServiceTenancy
FilterServiceTenancies returns a filtered slice of ServiceTenancy matching the provided filter string.
Types ¶
type Category ¶
type Category int
Category represents a logical grouping for toolkit data.
const ( // CategoryUnknown is the zero value for Category. CategoryUnknown Category = iota // Tenant is a category for tenant-level data. Tenant // LimitDefinition is a category for limit definitions. LimitDefinition // ConsolePropertyDefinition is a category for console property definitions. ConsolePropertyDefinition // PropertyDefinition is a category for property definitions. PropertyDefinition // LimitTenancyOverride is a category for limit tenancy overrides. LimitTenancyOverride // ConsolePropertyTenancyOverride is a category for console property tenancy overrides. ConsolePropertyTenancyOverride // PropertyTenancyOverride is a category for property tenancy overrides. PropertyTenancyOverride // LimitRegionalOverride is a category for limit regional overrides. LimitRegionalOverride // ConsolePropertyRegionalOverride is a category for console property regional overrides. ConsolePropertyRegionalOverride // PropertyRegionalOverride is a category for property regional overrides. PropertyRegionalOverride // BaseModel is a category for base models. BaseModel // ModelArtifact is a category for model artifacts. ModelArtifact // Environment is a category for environments. Environment // ServiceTenancy is a category for service tenancies. ServiceTenancy // GpuPool is a category for GPU pools. GpuPool // GpuNode is a category for GPU nodes. GpuNode // DedicatedAICluster is a category for dedicated AI clusters. DedicatedAICluster )
func ParseCategory ¶
ParseCategory parses a string (case-insensitive, with common aliases) into a Category enum.
func (Category) Definition ¶
Definition returns the definition category for the receiver.
func (Category) IsScopeOf ¶
IsScopeOf returns true if the receiver is a scope of the given category.
func (Category) ScopedCategories ¶
ScopedCategories returns the categories that are scoped by the receiver.
type ToolkitContext ¶
ToolkitContext holds the current scope and name for filtering or scoping operations.