Documentation
¶
Index ¶
- Variables
- func ByContentEncoding(ce string) protocol.CompressType
- func ByFileExtension(ex string) protocol.CompressType
- func ByID(id uint64) protocol.CompressType
- func ByMediaType(mt string) protocol.CompressType
- func ContentEncodings() []string
- type CompressType
- type CompressTypes
- func (cts *CompressTypes) ContentEncodings() []string
- func (cts *CompressTypes) GetCompressTypeByContentEncoding(ce string) (ct protocol.CompressType, err protocol.Error)
- func (cts *CompressTypes) GetCompressTypeByFileExtension(ex string) (ct protocol.CompressType, err protocol.Error)
- func (cts *CompressTypes) GetCompressTypeByID(id uint64) (ct protocol.CompressType, err protocol.Error)
- func (cts *CompressTypes) GetCompressTypeByMediaType(mt string) (ct protocol.CompressType, err protocol.Error)
- func (cts *CompressTypes) RegisterCompressType(ct protocol.CompressType)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = er.New(mediatype.New("domain/compress.protocol.error; name=not-found").SetDetail(protocol.LanguageEnglish, domainEnglish, "Not Found", "Can't find requested compression||decompression algorithm", "", "", nil)) ErrSourceNotChangeable = er.New(mediatype.New("domain/compress.protocol.error; name=source-not-changeable").SetDetail(protocol.LanguageEnglish, domainEnglish, "Source not Changeable", "Can't read from other source than source given in compression||decompression creation", "", "", nil)) )
Errors
Functions ¶
func ByContentEncoding ¶
func ByContentEncoding(ce string) protocol.CompressType
func ByFileExtension ¶
func ByFileExtension(ex string) protocol.CompressType
func ByID ¶
func ByID(id uint64) protocol.CompressType
func ByMediaType ¶
func ByMediaType(mt string) protocol.CompressType
func ContentEncodings ¶
func ContentEncodings() []string
Types ¶
type CompressType ¶
type CompressType struct {
// contains filtered or unexported fields
}
func (*CompressType) ContentEncoding ¶
func (ct *CompressType) ContentEncoding() string
func (*CompressType) FileExtension ¶
func (ct *CompressType) FileExtension() string
func (*CompressType) MediaType ¶
func (ct *CompressType) MediaType() protocol.MediaType
type CompressTypes ¶
type CompressTypes struct{}
CompressTypes store all compress types to use by anyone want protocol.CompressTypes
func (*CompressTypes) ContentEncodings ¶
func (cts *CompressTypes) ContentEncodings() []string
func (*CompressTypes) GetCompressTypeByContentEncoding ¶
func (cts *CompressTypes) GetCompressTypeByContentEncoding(ce string) (ct protocol.CompressType, err protocol.Error)
func (*CompressTypes) GetCompressTypeByFileExtension ¶
func (cts *CompressTypes) GetCompressTypeByFileExtension(ex string) (ct protocol.CompressType, err protocol.Error)
func (*CompressTypes) GetCompressTypeByID ¶
func (cts *CompressTypes) GetCompressTypeByID(id uint64) (ct protocol.CompressType, err protocol.Error)
func (*CompressTypes) GetCompressTypeByMediaType ¶
func (cts *CompressTypes) GetCompressTypeByMediaType(mt string) (ct protocol.CompressType, err protocol.Error)
func (*CompressTypes) RegisterCompressType ¶
func (cts *CompressTypes) RegisterCompressType(ct protocol.CompressType)
RegisterCompressType register given CompressType
Click to show internal directories.
Click to hide internal directories.