Documentation ¶
Index ¶
Constants ¶
View Source
const (
// ContentTypeUndefinedMsg - message raised when content type for specific extension is not defined
ContentTypeUndefinedMsg = `content type for the "%s" extension is not defined`
)
Variables ¶
View Source
var ContentTypeConfig = []byte{} /* 1050 elements not displayed */
ContentTypeConfig - do not edit
Functions ¶
func GetContentType ¶
func GetContentType(cfg *ContentTypes, extension string) (string, error)
GetContentType - get content type by file extension
Types ¶
type ContentType ¶
type ContentType struct { Extension string `yaml:"extension"` ContentType string `yaml:"content-type"` }
ContentType - content types
type ContentTypes ¶
type ContentTypes struct {
ContentTypes []ContentType `yaml:"content-types"`
}
ContentTypes - data structure for content types configuration
func GetContentTypes ¶
func GetContentTypes() (*ContentTypes, error)
GetContentTypes - gets content types associated with files extensions from the configuration config_type_cgf.yaml
Click to show internal directories.
Click to hide internal directories.