Documentation
¶
Index ¶
Constants ¶
View Source
const ( ArtifactTypeKitManifest = "application/vnd.kitops.modelkit.manifest.v1+json" ArtifactTypeModelManifest = "application/vnd.cncf.model.manifest.v1+json" )
Variables ¶
This section is empty.
Functions ¶
func FormatMediaTypeForUser ¶
func IsValidCompression ¶
Types ¶
type BaseType ¶
type BaseType int
const ( UnknownBaseType BaseType = iota // ConfigBaseType is the base type for model configs ConfigBaseType // ModelBaseType is the base type for primary model files ModelBaseType // ModelPartBaseType is the base type for model-related files. In ModelPack formats, it is // reused for the `model.config` type ModelPartBaseType // DatasetBaseType is the base type for dataset layers DatasetBaseType // CodeBaseType is the base type for code layers CodeBaseType // DocsBaseType is the base type for documentation layers DocsBaseType )
func ParseKitBaseType ¶
func ParseModelPackBaseType ¶
type CompressionType ¶
type CompressionType int
const ( UnknownCompression CompressionType = iota NoneCompression GzipCompression GzipFastestCompression ZstdCompression )
func ParseCompression ¶
func ParseCompression(c string) (CompressionType, error)
func (CompressionType) String ¶
func (c CompressionType) String() string
type MediaType ¶
type MediaType interface {
Base() BaseType
Compression() CompressionType
Format() Format
String() string
UserString() string
}
var KitConfigMediaType MediaType = &kitopsMediaType{ baseType: ConfigBaseType, }
var ModelPackConfigMediaType MediaType = &modelpackMediatype{ baseType: ConfigBaseType, }
func New ¶
func New(modelFormat ModelFormat, base BaseType, format Format, comp CompressionType) MediaType
func ParseMediaType ¶
type ModelFormat ¶
type ModelFormat int
const ( UnknownModelFormat ModelFormat = iota KitFormat ModelPackFormat )
func ModelFormatForManifest ¶
func ModelFormatForManifest(manifest *ocispec.Manifest) (ModelFormat, error)
Click to show internal directories.
Click to hide internal directories.