Documentation ¶
Index ¶
- Variables
- func Marshal[T any](ss *[]T, mt mime_type.MimeType, bs []byte) error
- func MimeTypeFromFile(path string) (mime_type.MimeType, error)
- func MimeTypeFromPath(root string) (map[string]mime_type.MimeType, error)
- func ReadFromFile(path string) ([]byte, mime_type.MimeType, error)
- func ReadFromPath(root string) (map[string]ReadContent, error)
- func UnmarshalFromBytes[T any](data []byte, v T, mt mime_type.MimeType) error
- func UnmarshalFromFile[T any](path string) (T, mime_type.MimeType, error)
- func UnmarshalFromPath[T any](root string, m map[string]UnmarshaledContent[T]) error
- type ReadContent
- type UnmarshaledContent
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMimeTypeUnsupported = errorer.Errorf("unknown MIME type") ErrMimeTypeUnsupportedV = errorer.Errorfn(ErrMimeTypeUnsupported) ErrNotFile = errorer.Errorf("not a file") ErrNotFileV = errorer.Errorfn(ErrNotFile) )
View Source
var ( SUPPORTED_TYPES = []mime_type.MimeType{ mime_type.ApplicationYaml, mime_type.ApplicationJson, } )
Functions ¶
func MimeTypeFromFile ¶ added in v1.0.4
func MimeTypeFromPath ¶ added in v1.0.4
func ReadFromFile ¶ added in v1.0.4
func ReadFromPath ¶ added in v1.0.4
func ReadFromPath(root string) (map[string]ReadContent, error)
func UnmarshalFromBytes ¶ added in v1.0.4
func UnmarshalFromFile ¶ added in v1.0.2
func UnmarshalFromPath ¶ added in v1.0.2
func UnmarshalFromPath[T any](root string, m map[string]UnmarshaledContent[T]) error
Types ¶
type ReadContent ¶ added in v1.0.4
type UnmarshaledContent ¶ added in v1.0.4
Click to show internal directories.
Click to hide internal directories.