enum

package
v0.0.0-...-82f94ed Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ContentType_name = map[int32]string{
		0: "NEWS",
		1: "COMEDY",
		2: "SPORTS",
	}
	ContentType_value = map[string]int32{
		"NEWS":   0,
		"COMEDY": 1,
		"SPORTS": 2,
	}
)

Enum value maps for ContentType.

View Source
var (
	FilterType_name = map[int32]string{
		0: "RULED",
		1: "MANUAL",
	}
	FilterType_value = map[string]int32{
		"RULED":  0,
		"MANUAL": 1,
	}
)

Enum value maps for FilterType.

View Source
var File_app_episode_service_enum_episode_enum_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ContentType

type ContentType int32
const (
	ContentType_NEWS   ContentType = 0 // 新闻
	ContentType_COMEDY ContentType = 1 // 喜剧
	ContentType_SPORTS ContentType = 2 // 体育
)

func (ContentType) Descriptor

func (ContentType) Enum

func (x ContentType) Enum() *ContentType

func (ContentType) EnumDescriptor deprecated

func (ContentType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ContentType.Descriptor instead.

func (ContentType) MarshalBSONValue

func (e ContentType) MarshalBSONValue() (bsontype.Type, []byte, error)

MarshalBSONValue 确保 ContentType 在往 mongodb 写入数据时,使用字符串形式保存

func (ContentType) MarshalJSON

func (e ContentType) MarshalJSON() ([]byte, error)

MarshalJSON 确保 ContentType 在导出为 Json 时,使用字符串形式编码

func (ContentType) Number

func (x ContentType) Number() protoreflect.EnumNumber

func (ContentType) String

func (x ContentType) String() string

func (ContentType) Type

func (*ContentType) UnmarshalBSONValue

func (e *ContentType) UnmarshalBSONValue(t bsontype.Type, b []byte) error

UnmarshalBSONValue 确保 ContentType 在从 mongodb 读取数据时,使用字符串形式读取,并解析为对应的 ContentType

func (*ContentType) UnmarshalJSON

func (e *ContentType) UnmarshalJSON(data []byte) error

UnmarshalJSON 确保从 Json 中解码 ContentType 类型时,使用字符串形式解码,并解析为对应的 ContentType

type FilterType

type FilterType int32
const (
	FilterType_RULED  FilterType = 0 // 规则筛选
	FilterType_MANUAL FilterType = 1 // 人工
)

func (FilterType) Descriptor

func (FilterType) Descriptor() protoreflect.EnumDescriptor

func (FilterType) Enum

func (x FilterType) Enum() *FilterType

func (FilterType) EnumDescriptor deprecated

func (FilterType) EnumDescriptor() ([]byte, []int)

Deprecated: Use FilterType.Descriptor instead.

func (FilterType) MarshalBSONValue

func (e FilterType) MarshalBSONValue() (bsontype.Type, []byte, error)

MarshalBSONValue 确保 FilterType 在往 mongodb 写入数据时,使用字符串形式保存

func (FilterType) MarshalJSON

func (e FilterType) MarshalJSON() ([]byte, error)

MarshalJSON 确保 FilterType 在导出为 Json 时,使用字符串形式编码

func (FilterType) Number

func (x FilterType) Number() protoreflect.EnumNumber

func (FilterType) String

func (x FilterType) String() string

func (FilterType) Type

func (*FilterType) UnmarshalBSONValue

func (e *FilterType) UnmarshalBSONValue(t bsontype.Type, b []byte) error

UnmarshalBSONValue 确保 FilterType 在从 mongodb 读取数据时,使用字符串形式读取,并解析为对应的 FilterType

func (*FilterType) UnmarshalJSON

func (e *FilterType) UnmarshalJSON(data []byte) error

UnmarshalJSON 确保从 Json 中解码 FilterType 类型时,使用字符串形式解码,并解析为对应的 FilterType

Jump to

Keyboard shortcuts

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