constants

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Default name for Kitfile (otherwise specified via the -f flag in pack)
	DefaultKitfileName = "Kitfile"
	// IgnoreFileName is the name for the Kit ignore file
	IgnoreFileName = ".kitignore"

	// Constants for the directory structure of kit's cached images and credentials
	// Modelkits are stored in $KITOPS_HOME/storage/ and
	// credentials are stored in $KITOPS_HOME/credentials.json
	DefaultConfigSubdir               = "kitops"
	StorageSubpath                    = "storage"
	CacheSubpath                      = "cache"
	CredentialsSubpath                = "credentials.json"
	HarnessSubpath                    = "harness"
	HarnessProcessFile                = "process.pid"
	HarnessLogFile                    = "harness.log"
	UpdateNotificationsConfigFilename = "disable-update-notifications"

	// Dev command model extraction/cache paths
	DevModelsSubpath       = "dev-models"
	CurrentDevModelSubpath = "current"

	// Kitops-specific annotations for modelkit artifacts
	// TODO: update these to use the newer kitops.org domain
	CliVersionAnnotation  = "ml.kitops.modelkit.cli-version"
	KitfileJsonAnnotation = "ml.kitops.modelkit.kitfile"

	// MaxModelRefChain is the maximum number of "parent" modelkits a modelkit may have
	// by e.g. referring to another modelkit in its .model.path
	MaxModelRefChain = 10
)
View Source
const (
	KitopsHomeEnvVar    = "KITOPS_HOME"
	ClientCertEnvVar    = "KITOPS_CLIENT_CERT"
	ClientCertKeyEnvVar = "KITOPS_CLIENT_KEY"
)

Variables

View Source
var (
	Version   = "unknown"
	GitCommit = "unknown"
	BuildTime = "unknown"
	GoVersion = runtime.Version()
)

Default build-time variables These values are overridden via ldflags

Functions

func CachePath

func CachePath(configBase string) string

func CredentialsPath

func CredentialsPath(configBase string) string

func DefaultConfigPath

func DefaultConfigPath() (string, error)

DefaultConfigPath returns the default configuration and cache directory for the CLI. This is platform-dependent, using

  • $XDG_DATA_HOME/kitops on Linux, with fall back to $HOME/.local/share/kitops
  • ~/Library/Caches/kitops on MacOS
  • %LOCALAPPDATA%\kitops

func DefaultKitfileNames

func DefaultKitfileNames() []string

func DevModelsPath added in v1.8.0

func DevModelsPath(configBase string) string

DevModelsPath returns the base directory used for dev-mode model extractions

func ExtractedDevModelPath added in v1.8.0

func ExtractedDevModelPath(configBase string) string

ExtractedDevModelPath returns the path to the "extracted" dev-mode model directory

func FileIsLocalIndex

func FileIsLocalIndex(indexPath string) bool

func HarnessPath

func HarnessPath(configBase string) string

func IndexJsonPath

func IndexJsonPath(storageBase string) string

IndexJsonPath is a wrapper for getting the index.json path for a local OCI index, based off the base path of the index.

func IndexJsonPathForRepo

func IndexJsonPathForRepo(storageBase, repo string) string

IndexJsonPathForRepo returns the path to an index.json that is scoped for a specific repo (org/name)

func IngestPath

func IngestPath(storageBase string) string

func IsDefaultKitfileName

func IsDefaultKitfileName(filename string) bool

func RepoForIndexJsonPath

func RepoForIndexJsonPath(indexPath string) (string, error)

RepoForIndexJsonPath returns the repository for an OCI index JSON file as generated by IndexJsonPathForRepo

func StoragePath

func StoragePath(configBase string) string

func TagIndexPathForRepo

func TagIndexPathForRepo(storageBase, repo string) string

Types

type ConfigKey

type ConfigKey struct{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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