domain

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package domain defines core business types and category enums for the toolkit application.

Index

Constants

This section is empty.

Variables

View Source
var (

	// Aliases contains all known aliases for categories.
	Aliases []string

	// Categories contains all defined categories.
	Categories []Category
)
View Source
var ErrUnknownCategory = errors.New("unknown category")

ErrUnknownCategory is returned when a string cannot be parsed into a known Category.

Functions

func GetInitials added in v0.1.4

func GetInitials(s string) string

GetInitials returns the initials of a string, used for aliasing.

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
	// Alias is a category for reporting all aliases.
	Alias
)

func ParseCategory

func ParseCategory(s string) (Category, error)

ParseCategory parses a string (case-insensitive, with common aliases) into a Category enum.

func (Category) Definition

func (e Category) Definition() Category

Definition returns the definition category for the receiver.

func (Category) GetAliases added in v0.1.4

func (e Category) GetAliases() []string

GetAliases returns a list of aliases for the Category.

func (Category) GetFilterableFields added in v0.1.4

func (e Category) GetFilterableFields() []string

GetFilterableFields returns the filterable fields for the Category.

func (Category) GetName added in v0.1.4

func (e Category) GetName() string

GetName returns the string name of the Category.

func (Category) IsFaulty added in v0.1.4

func (e Category) IsFaulty() bool

IsFaulty returns whether the Category is considered faulty.

func (Category) IsScope

func (e Category) IsScope() bool

IsScope returns true if the category is a scope category.

func (Category) IsScopeOf

func (e Category) IsScopeOf(o Category) bool

IsScopeOf returns true if the receiver is a scope of the given category.

func (Category) NeedsKubeConfig added in v0.2.0

func (e Category) NeedsKubeConfig() bool

NeedsKubeConfig reports whether loading this category requires a kubeconfig. These categories are sourced from a live cluster; the rest come from the on-disk repo.

func (Category) ScopedCategories

func (e Category) ScopedCategories() []Category

ScopedCategories returns the categories that are scoped by the receiver.

func (Category) String

func (i Category) String() string

type ToolkitContext

type ToolkitContext struct {
	Category Category
	Name     string
}

ToolkitContext holds the current scope and name for filtering or scoping operations.

Jump to

Keyboard shortcuts

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