Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRawMediaType ¶ added in v0.0.5
IsRawMediaType returns true if the media type is raw.
Types ¶
type Codec ¶
type Codec interface {
// Type returns the type of the codec.
Type() Type
// Encode encodes the target file into a reader.
Encode(targetFilePath, workDirPath string) (io.Reader, error)
// Decode reads the input reader and decodes the data into the output path.
Decode(outputDir, filePath string, reader io.Reader, desc ocispec.Descriptor) error
}
Codec is an interface for encoding and decoding the data.
type Type ¶
type Type = string
func TypeFromMediaType ¶
TypeFromMediaType returns the codec type from the media type, return empty string if not supported.
Click to show internal directories.
Click to hide internal directories.