media

package
v0.0.0-...-db8c6ed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2021 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectType

func DetectType(buf []byte) string

Types

type MediaTypeInfo

type MediaTypeInfo interface {
	// MediaType returns the type of media for this info.
	MediaType() mediapb.MediaType

	// DirectoryName returns a string which usually used to construct
	// path for storing the media files.
	DirectoryName() string

	// IsContentTypeAllowed returns true if the provided content type string
	// is allowed for the media type.
	IsContentTypeAllowed(contentType string) bool
}

func GetMediaTypeInfo

func GetMediaTypeInfo(mediaType mediapb.MediaType) MediaTypeInfo

func GetMediaTypeInfoByTypeName

func GetMediaTypeInfoByTypeName(mediaTypeName string) MediaTypeInfo

Directories

Path Synopsis
s3

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL