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

Golang proto.UnmarshalJSONEnum函数代码示例

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

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



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

示例1: UnmarshalJSON

func (x *ActionItemDTO_CommodityAttribute) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(ActionItemDTO_CommodityAttribute_value, data, "ActionItemDTO_CommodityAttribute")
	if err != nil {
		return err
	}
	*x = ActionItemDTO_CommodityAttribute(value)
	return nil
}
开发者ID:DongyiYang,项目名称:vmturbo-go-sdk,代码行数:8,代码来源:ActionExecution.pb.go


示例2: UnmarshalJSON

func (x *EGCToGCMsg) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(EGCToGCMsg_value, data, "EGCToGCMsg")
	if err != nil {
		return err
	}
	*x = EGCToGCMsg(value)
	return nil
}
开发者ID:Slacki,项目名称:go-steam,代码行数:8,代码来源:system.pb.go


示例3: UnmarshalJSON

func (x *URLFetchServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(URLFetchServiceError_ErrorCode_value, data, "URLFetchServiceError_ErrorCode")
	if err != nil {
		return err
	}
	*x = URLFetchServiceError_ErrorCode(value)
	return nil
}
开发者ID:Celluliodio,项目名称:flannel,代码行数:8,代码来源:urlfetch_service.pb.go


示例4: UnmarshalJSON

func (x *Envelope_Type) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Envelope_Type_value, data, "Envelope_Type")
	if err != nil {
		return err
	}
	*x = Envelope_Type(value)
	return nil
}
开发者ID:elimisteve,项目名称:textsecure,代码行数:8,代码来源:TextSecure.pb.go


示例5: UnmarshalJSON

func (x *PartnerAccountType) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(PartnerAccountType_value, data, "PartnerAccountType")
	if err != nil {
		return err
	}
	*x = PartnerAccountType(value)
	return nil
}
开发者ID:Inkp,项目名称:go-steam,代码行数:8,代码来源:gcsdk.pb.go


示例6: UnmarshalJSON

func (x *PresenceResponse_SHOW) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(PresenceResponse_SHOW_value, data, "PresenceResponse_SHOW")
	if err != nil {
		return err
	}
	*x = PresenceResponse_SHOW(value)
	return nil
}
开发者ID:David-Shibley,项目名称:goPlayground,代码行数:8,代码来源:xmpp_service.pb.go


示例7: UnmarshalJSON

func (x *ChromeInfraEvent_TimestampKind) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(ChromeInfraEvent_TimestampKind_value, data, "ChromeInfraEvent_TimestampKind")
	if err != nil {
		return err
	}
	*x = ChromeInfraEvent_TimestampKind(value)
	return nil
}
开发者ID:nicko96,项目名称:Chrome-Infra,代码行数:8,代码来源:chrome_infra_log.pb.go


示例8: UnmarshalJSON

func (x *StatusUpdateRecord_Type) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(StatusUpdateRecord_Type_value, data, "StatusUpdateRecord_Type")
	if err != nil {
		return err
	}
	*x = StatusUpdateRecord_Type(value)
	return nil
}
开发者ID:lsheiba,项目名称:charmander-scheduler,代码行数:8,代码来源:messages.pb.go


示例9: UnmarshalJSON

func (x *ContainerOP) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(ContainerOP_value, data, "ContainerOP")
	if err != nil {
		return err
	}
	*x = ContainerOP(value)
	return nil
}
开发者ID:mysll,项目名称:flynet,代码行数:8,代码来源:container.pb.go


示例10: UnmarshalJSON

func (x *ReplicationState_State) UnmarshalJSON(data []byte) error {
	value, err := proto1.UnmarshalJSONEnum(ReplicationState_State_value, data, "ReplicationState_State")
	if err != nil {
		return err
	}
	*x = ReplicationState_State(value)
	return nil
}
开发者ID:yzl11,项目名称:vessel,代码行数:8,代码来源:ZooKeeper.pb.go


示例11: UnmarshalJSON

func (x *ProtoExecutionResult_ErrorType) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(ProtoExecutionResult_ErrorType_value, data, "ProtoExecutionResult_ErrorType")
	if err != nil {
		return err
	}
	*x = ProtoExecutionResult_ErrorType(value)
	return nil
}
开发者ID:manuviswam,项目名称:gauge-go,代码行数:8,代码来源:spec.pb.go


示例12: UnmarshalJSON

func (x *EDOTAChatWheelMessage) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(EDOTAChatWheelMessage_value, data, "EDOTAChatWheelMessage")
	if err != nil {
		return err
	}
	*x = EDOTAChatWheelMessage(value)
	return nil
}
开发者ID:mzuber,项目名称:yasha,代码行数:8,代码来源:dota_commonmessages.pb.go


示例13: UnmarshalJSON

func (x *APIMessage_APIMessageType) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(APIMessage_APIMessageType_value, data, "APIMessage_APIMessageType")
	if err != nil {
		return err
	}
	*x = APIMessage_APIMessageType(value)
	return nil
}
开发者ID:krwhitney,项目名称:gauge,代码行数:8,代码来源:api.pb.go



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Golang proto.UnmarshalText函数代码示例发布时间:2022-05-23
下一篇:
Golang proto.Unmarshal函数代码示例发布时间: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