goext/imageext/enums_gen.go

301 lines
6.7 KiB
Go
Raw Normal View History

2024-05-14 12:46:49 +02:00
// Code generated by enum-generate.go DO NOT EDIT.
package imageext
import "gogs.mikescher.com/BlackForestBytes/goext/langext"
import "gogs.mikescher.com/BlackForestBytes/goext/enums"
const ChecksumEnumGenerator = "1da5383c33ee442fd0b899369053f66bdc85bed2dbf906949d3edfeedfe13340" // GoExtVersion: 0.0.449
// ================================ ImageFit ================================
//
// File: image.go
// StringEnum: true
// DescrEnum: false
// DataEnum: false
//
var __ImageFitValues = []ImageFit{
ImageFitStretch,
ImageFitCover,
ImageFitContainCenter,
ImageFitContainTopLeft,
ImageFitContainTopRight,
ImageFitContainBottomLeft,
ImageFitContainBottomRight,
}
var __ImageFitVarnames = map[ImageFit]string{
ImageFitStretch: "ImageFitStretch",
ImageFitCover: "ImageFitCover",
ImageFitContainCenter: "ImageFitContainCenter",
ImageFitContainTopLeft: "ImageFitContainTopLeft",
ImageFitContainTopRight: "ImageFitContainTopRight",
ImageFitContainBottomLeft: "ImageFitContainBottomLeft",
ImageFitContainBottomRight: "ImageFitContainBottomRight",
}
func (e ImageFit) Valid() bool {
return langext.InArray(e, __ImageFitValues)
}
func (e ImageFit) Values() []ImageFit {
return __ImageFitValues
}
func (e ImageFit) ValuesAny() []any {
return langext.ArrCastToAny(__ImageFitValues)
}
func (e ImageFit) ValuesMeta() []enums.EnumMetaValue {
return ImageFitValuesMeta()
}
func (e ImageFit) String() string {
return string(e)
}
func (e ImageFit) VarName() string {
if d, ok := __ImageFitVarnames[e]; ok {
return d
}
return ""
}
func (e ImageFit) TypeName() string {
return "ImageFit"
}
func (e ImageFit) PackageName() string {
return "media"
}
func (e ImageFit) Meta() enums.EnumMetaValue {
return enums.EnumMetaValue{VarName: e.VarName(), Value: e, Description: nil}
}
func ParseImageFit(vv string) (ImageFit, bool) {
for _, ev := range __ImageFitValues {
if string(ev) == vv {
return ev, true
}
}
return "", false
}
func ImageFitValues() []ImageFit {
return __ImageFitValues
}
func ImageFitValuesMeta() []enums.EnumMetaValue {
return []enums.EnumMetaValue{
ImageFitStretch.Meta(),
ImageFitCover.Meta(),
ImageFitContainCenter.Meta(),
ImageFitContainTopLeft.Meta(),
ImageFitContainTopRight.Meta(),
ImageFitContainBottomLeft.Meta(),
ImageFitContainBottomRight.Meta(),
}
}
// ================================ ImageCompresson ================================
//
// File: image.go
// StringEnum: true
// DescrEnum: false
// DataEnum: false
//
var __ImageCompressonValues = []ImageCompresson{
CompressionPNGNone,
CompressionPNGSpeed,
CompressionPNGBest,
CompressionJPEG100,
CompressionJPEG90,
CompressionJPEG80,
CompressionJPEG70,
CompressionJPEG60,
CompressionJPEG50,
CompressionJPEG25,
CompressionJPEG10,
CompressionJPEG1,
}
var __ImageCompressonVarnames = map[ImageCompresson]string{
CompressionPNGNone: "CompressionPNGNone",
CompressionPNGSpeed: "CompressionPNGSpeed",
CompressionPNGBest: "CompressionPNGBest",
CompressionJPEG100: "CompressionJPEG100",
CompressionJPEG90: "CompressionJPEG90",
CompressionJPEG80: "CompressionJPEG80",
CompressionJPEG70: "CompressionJPEG70",
CompressionJPEG60: "CompressionJPEG60",
CompressionJPEG50: "CompressionJPEG50",
CompressionJPEG25: "CompressionJPEG25",
CompressionJPEG10: "CompressionJPEG10",
CompressionJPEG1: "CompressionJPEG1",
}
func (e ImageCompresson) Valid() bool {
return langext.InArray(e, __ImageCompressonValues)
}
func (e ImageCompresson) Values() []ImageCompresson {
return __ImageCompressonValues
}
func (e ImageCompresson) ValuesAny() []any {
return langext.ArrCastToAny(__ImageCompressonValues)
}
func (e ImageCompresson) ValuesMeta() []enums.EnumMetaValue {
return ImageCompressonValuesMeta()
}
func (e ImageCompresson) String() string {
return string(e)
}
func (e ImageCompresson) VarName() string {
if d, ok := __ImageCompressonVarnames[e]; ok {
return d
}
return ""
}
func (e ImageCompresson) TypeName() string {
return "ImageCompresson"
}
func (e ImageCompresson) PackageName() string {
return "media"
}
func (e ImageCompresson) Meta() enums.EnumMetaValue {
return enums.EnumMetaValue{VarName: e.VarName(), Value: e, Description: nil}
}
func ParseImageCompresson(vv string) (ImageCompresson, bool) {
for _, ev := range __ImageCompressonValues {
if string(ev) == vv {
return ev, true
}
}
return "", false
}
func ImageCompressonValues() []ImageCompresson {
return __ImageCompressonValues
}
func ImageCompressonValuesMeta() []enums.EnumMetaValue {
return []enums.EnumMetaValue{
CompressionPNGNone.Meta(),
CompressionPNGSpeed.Meta(),
CompressionPNGBest.Meta(),
CompressionJPEG100.Meta(),
CompressionJPEG90.Meta(),
CompressionJPEG80.Meta(),
CompressionJPEG70.Meta(),
CompressionJPEG60.Meta(),
CompressionJPEG50.Meta(),
CompressionJPEG25.Meta(),
CompressionJPEG10.Meta(),
CompressionJPEG1.Meta(),
}
}
// ================================ MimeCategory ================================
//
// File: mime.go
// StringEnum: true
// DescrEnum: false
// DataEnum: false
//
var __MimeCategoryValues = []MimeCategory{
CatDocument,
CatImage,
CatVideo,
CatContainer,
}
var __MimeCategoryVarnames = map[MimeCategory]string{
CatDocument: "CatDocument",
CatImage: "CatImage",
CatVideo: "CatVideo",
CatContainer: "CatContainer",
}
func (e MimeCategory) Valid() bool {
return langext.InArray(e, __MimeCategoryValues)
}
func (e MimeCategory) Values() []MimeCategory {
return __MimeCategoryValues
}
func (e MimeCategory) ValuesAny() []any {
return langext.ArrCastToAny(__MimeCategoryValues)
}
func (e MimeCategory) ValuesMeta() []enums.EnumMetaValue {
return MimeCategoryValuesMeta()
}
func (e MimeCategory) String() string {
return string(e)
}
func (e MimeCategory) VarName() string {
if d, ok := __MimeCategoryVarnames[e]; ok {
return d
}
return ""
}
func (e MimeCategory) TypeName() string {
return "MimeCategory"
}
func (e MimeCategory) PackageName() string {
return "media"
}
func (e MimeCategory) Meta() enums.EnumMetaValue {
return enums.EnumMetaValue{VarName: e.VarName(), Value: e, Description: nil}
}
func ParseMimeCategory(vv string) (MimeCategory, bool) {
for _, ev := range __MimeCategoryValues {
if string(ev) == vv {
return ev, true
}
}
return "", false
}
func MimeCategoryValues() []MimeCategory {
return __MimeCategoryValues
}
func MimeCategoryValuesMeta() []enums.EnumMetaValue {
return []enums.EnumMetaValue{
CatDocument.Meta(),
CatImage.Meta(),
CatVideo.Meta(),
CatContainer.Meta(),
}
}
// ================================ ================= ================================
func AllPackageEnums() []enums.Enum {
return []enums.Enum{
ImageFitStretch, // ImageFit
CompressionPNGNone, // ImageCompresson
CatDocument, // MimeCategory
}
}