Ai
7 Star 23 Fork 31

go-course/go8

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
enum.pb.go 3.75 KB
一键复制 编辑 原始数据 按行查看 历史
Mr.Yu 提交于 2022-10-01 11:08 +08:00 . add protobuf
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.6
// source: pb/enum.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 定义文章只有下面几种状态
type STATUS int32
const (
// 草稿状态
STATUS_DRAFT STATUS = 0
// 已发布
STATUS_PUBLISHED STATUS = 1
)
// Enum value maps for STATUS.
var (
STATUS_name = map[int32]string{
0: "DRAFT",
1: "PUBLISHED",
}
STATUS_value = map[string]int32{
"DRAFT": 0,
"PUBLISHED": 1,
}
)
func (x STATUS) Enum() *STATUS {
p := new(STATUS)
*p = x
return p
}
func (x STATUS) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (STATUS) Descriptor() protoreflect.EnumDescriptor {
return file_pb_enum_proto_enumTypes[0].Descriptor()
}
func (STATUS) Type() protoreflect.EnumType {
return &file_pb_enum_proto_enumTypes[0]
}
func (x STATUS) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use STATUS.Descriptor instead.
func (STATUS) EnumDescriptor() ([]byte, []int) {
return file_pb_enum_proto_rawDescGZIP(), []int{0}
}
var File_pb_enum_proto protoreflect.FileDescriptor
var file_pb_enum_proto_rawDesc = []byte{
0x0a, 0x0d, 0x70, 0x62, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x05, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2a, 0x22, 0x0a, 0x06, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53,
0x12, 0x09, 0x0a, 0x05, 0x44, 0x52, 0x41, 0x46, 0x54, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x50,
0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69,
0x74, 0x65, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x75, 0x72, 0x73,
0x65, 0x2f, 0x67, 0x6f, 0x38, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_pb_enum_proto_rawDescOnce sync.Once
file_pb_enum_proto_rawDescData = file_pb_enum_proto_rawDesc
)
func file_pb_enum_proto_rawDescGZIP() []byte {
file_pb_enum_proto_rawDescOnce.Do(func() {
file_pb_enum_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_enum_proto_rawDescData)
})
return file_pb_enum_proto_rawDescData
}
var file_pb_enum_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_pb_enum_proto_goTypes = []interface{}{
(STATUS)(0), // 0: hello.STATUS
}
var file_pb_enum_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_pb_enum_proto_init() }
func file_pb_enum_proto_init() {
if File_pb_enum_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pb_enum_proto_rawDesc,
NumEnums: 1,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pb_enum_proto_goTypes,
DependencyIndexes: file_pb_enum_proto_depIdxs,
EnumInfos: file_pb_enum_proto_enumTypes,
}.Build()
File_pb_enum_proto = out.File
file_pb_enum_proto_rawDesc = nil
file_pb_enum_proto_goTypes = nil
file_pb_enum_proto_depIdxs = nil
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/go-course/go8.git
git@gitee.com:go-course/go8.git
go-course
go8
go8
6a8978f41a84

搜索帮助