Documentation
¶
Index ¶
- Constants
- Variables
- func CachePath(configBase string) string
- func CredentialsPath(configBase string) string
- func DefaultConfigPath() (string, error)
- func DefaultKitfileNames() []string
- func DevModelsPath(configBase string) string
- func ExtractedDevModelPath(configBase string) string
- func FileIsLocalIndex(indexPath string) bool
- func HarnessPath(configBase string) string
- func IndexJsonPath(storageBase string) string
- func IndexJsonPathForRepo(storageBase, repo string) string
- func IngestPath(storageBase string) string
- func IsDefaultKitfileName(filename string) bool
- func RepoForIndexJsonPath(indexPath string) (string, error)
- func StoragePath(configBase string) string
- func TagIndexPathForRepo(storageBase, repo string) string
- type ConfigKey
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 CredentialsPath ¶
func DefaultConfigPath ¶
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
DevModelsPath returns the base directory used for dev-mode model extractions
func ExtractedDevModelPath ¶ added in v1.8.0
ExtractedDevModelPath returns the path to the "extracted" dev-mode model directory
func FileIsLocalIndex ¶
func HarnessPath ¶
func IndexJsonPath ¶
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 ¶
IndexJsonPathForRepo returns the path to an index.json that is scoped for a specific repo (org/name)
func IngestPath ¶
func IsDefaultKitfileName ¶
func RepoForIndexJsonPath ¶
RepoForIndexJsonPath returns the repository for an OCI index JSON file as generated by IndexJsonPathForRepo
func StoragePath ¶
func TagIndexPathForRepo ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.