• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang proto.RegisterType函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中github.com/maditya/protobuf/proto.RegisterType函数的典型用法代码示例。如果您正苦于以下问题:Golang RegisterType函数的具体用法?Golang RegisterType怎么用?Golang RegisterType使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了RegisterType函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: init

func init() {
	proto.RegisterType((*NidOptEnum)(nil), "enumstringer.NidOptEnum")
	proto.RegisterType((*NinOptEnum)(nil), "enumstringer.NinOptEnum")
	proto.RegisterType((*NidRepEnum)(nil), "enumstringer.NidRepEnum")
	proto.RegisterType((*NinRepEnum)(nil), "enumstringer.NinRepEnum")
	proto.RegisterEnum("enumstringer.TheTestEnum", TheTestEnum_name, TheTestEnum_value)
}
开发者ID:maditya,项目名称:protobuf,代码行数:7,代码来源:enumstringer.pb.go


示例2: init

func init() {
	proto.RegisterType((*DoubleValue)(nil), "google.protobuf.DoubleValue")
	proto.RegisterType((*FloatValue)(nil), "google.protobuf.FloatValue")
	proto.RegisterType((*Int64Value)(nil), "google.protobuf.Int64Value")
	proto.RegisterType((*UInt64Value)(nil), "google.protobuf.UInt64Value")
	proto.RegisterType((*Int32Value)(nil), "google.protobuf.Int32Value")
	proto.RegisterType((*UInt32Value)(nil), "google.protobuf.UInt32Value")
	proto.RegisterType((*BoolValue)(nil), "google.protobuf.BoolValue")
	proto.RegisterType((*StringValue)(nil), "google.protobuf.StringValue")
	proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue")
}
开发者ID:maditya,项目名称:protobuf,代码行数:11,代码来源:wrappers.pb.go


示例3: init

func init() {
	proto.RegisterType((*Simple)(nil), "jsonpb.Simple")
	proto.RegisterType((*Repeats)(nil), "jsonpb.Repeats")
	proto.RegisterType((*Widget)(nil), "jsonpb.Widget")
	proto.RegisterType((*Maps)(nil), "jsonpb.Maps")
	proto.RegisterType((*MsgWithOneof)(nil), "jsonpb.MsgWithOneof")
	proto.RegisterType((*Real)(nil), "jsonpb.Real")
	proto.RegisterType((*Complex)(nil), "jsonpb.Complex")
	proto.RegisterType((*KnownTypes)(nil), "jsonpb.KnownTypes")
	proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value)
	proto.RegisterExtension(E_Complex_RealExtension)
	proto.RegisterExtension(E_Name)
}
开发者ID:maditya,项目名称:protobuf,代码行数:13,代码来源:test_objects.pb.go


示例4: init

func init() {
	proto1.RegisterType((*Foo)(nil), "proto.Foo")
}
开发者ID:maditya,项目名称:protobuf,代码行数:3,代码来源:proto.pb.go


示例5: init

func init() {
	proto.RegisterType((*SizeMessage)(nil), "sizeunderscore.SizeMessage")
}
开发者ID:maditya,项目名称:protobuf,代码行数:3,代码来源:sizeunderscore.pb.go


示例6: init

func init() {
	proto.RegisterType((*Empty)(nil), "google.protobuf.Empty")
}
开发者ID:maditya,项目名称:protobuf,代码行数:3,代码来源:empty.pb.go


示例7: init

func init() {
	proto.RegisterType((*Castaway)(nil), "castvalue.Castaway")
	proto.RegisterType((*Wilson)(nil), "castvalue.Wilson")
}
开发者ID:maditya,项目名称:protobuf,代码行数:4,代码来源:castvalue.pb.go


示例8: init

func init() {
	proto.RegisterType((*M)(nil), "asym.M")
	proto.RegisterType((*MyType)(nil), "asym.MyType")
}
开发者ID:maditya,项目名称:protobuf,代码行数:4,代码来源:asym.pb.go


示例9: init

func init() {
	proto1.RegisterType((*KeyserverStep)(nil), "proto.KeyserverStep")
	proto1.RegisterType((*EpochDelimiter)(nil), "proto.EpochDelimiter")
}
开发者ID:maditya,项目名称:coname,代码行数:4,代码来源:replication.pb.go


示例10: init

func init() {
	proto.RegisterType((*A)(nil), "vanity.A")
}
开发者ID:maditya,项目名称:protobuf,代码行数:3,代码来源:vanity.pb.go


示例11: init

func init() {
	proto.RegisterType((*IndexQuery)(nil), "index.IndexQuery")
}
开发者ID:maditya,项目名称:protobuf,代码行数:3,代码来源:index.pb.go


示例12: init

func init() {
	proto.RegisterType((*Message)(nil), "proto3_proto.Message")
	proto.RegisterType((*Nested)(nil), "proto3_proto.Nested")
	proto.RegisterType((*MessageWithMap)(nil), "proto3_proto.MessageWithMap")
	proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value)
}
开发者ID:maditya,项目名称:protobuf,代码行数:6,代码来源:proto3.pb.go


示例13: init

func init() {
	proto1.RegisterType((*VerifierStreamRequest)(nil), "proto.VerifierStreamRequest")
	proto1.RegisterType((*VerifierStep)(nil), "proto.VerifierStep")
	proto1.RegisterType((*Nothing)(nil), "proto.Nothing")
}
开发者ID:maditya,项目名称:coname,代码行数:5,代码来源:verifier.pb.go


示例14: init

func init() {
	proto.RegisterType((*TestRequest)(nil), "empty.TestRequest")
}
开发者ID:maditya,项目名称:protobuf,代码行数:3,代码来源:empty.pb.go


示例15: init

func init() {
	proto.RegisterType((*M)(nil), "filedotname.M")
}
开发者ID:maditya,项目名称:protobuf,代码行数:3,代码来源:file.dot.pb.go


示例16: init

func init() {
	proto.RegisterType((*Request)(nil), "my.test.Request")
	proto.RegisterType((*Request_SomeGroup)(nil), "my.test.Request.SomeGroup")
	proto.RegisterType((*Reply)(nil), "my.test.Reply")
	proto.RegisterType((*Reply_Entry)(nil), "my.test.Reply.Entry")
	proto.RegisterType((*OtherBase)(nil), "my.test.OtherBase")
	proto.RegisterType((*ReplyExtensions)(nil), "my.test.ReplyExtensions")
	proto.RegisterType((*OtherReplyExtensions)(nil), "my.test.OtherReplyExtensions")
	proto.RegisterType((*OldReply)(nil), "my.test.OldReply")
	proto.RegisterType((*Communique)(nil), "my.test.Communique")
	proto.RegisterType((*Communique_SomeGroup)(nil), "my.test.Communique.SomeGroup")
	proto.RegisterType((*Communique_Delta)(nil), "my.test.Communique.Delta")
	proto.RegisterEnum("my.test.HatType", HatType_name, HatType_value)
	proto.RegisterEnum("my.test.Days", Days_name, Days_value)
	proto.RegisterEnum("my.test.Request_Color", Request_Color_name, Request_Color_value)
	proto.RegisterEnum("my.test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value)
	proto.RegisterExtension(E_ReplyExtensions_Time)
	proto.RegisterExtension(E_ReplyExtensions_Carrot)
	proto.RegisterExtension(E_ReplyExtensions_Donut)
	proto.RegisterExtension(E_Tag)
	proto.RegisterExtension(E_Donut)
}
开发者ID:maditya,项目名称:protobuf,代码行数:22,代码来源:test.pb.go


示例17: init

func init() {
	proto.RegisterType((*Any)(nil), "google.protobuf.Any")
}
开发者ID:maditya,项目名称:protobuf,代码行数:3,代码来源:any.pb.go


示例18: init

func init() {
	proto.RegisterType((*UnorderedFields)(nil), "issue42.UnorderedFields")
	proto.RegisterType((*OrderedFields)(nil), "issue42.OrderedFields")
}
开发者ID:maditya,项目名称:protobuf,代码行数:4,代码来源:issue42.pb.go


示例19: init

func init() {
	proto.RegisterType((*SubObject)(nil), "subpkg.SubObject")
}
开发者ID:maditya,项目名称:protobuf,代码行数:3,代码来源:subproto.pb.go


示例20: init

func init() {
	proto1.RegisterType((*Duration)(nil), "proto.Duration")
}
开发者ID:maditya,项目名称:coname,代码行数:3,代码来源:duration.pb.go



注:本文中的github.com/maditya/protobuf/proto.RegisterType函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang proto.Size函数代码示例发布时间:2022-05-23
下一篇:
Golang proto.RegisterFile函数代码示例发布时间:2022-05-23
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap