本文整理汇总了Golang中code/google/com/p/gogoprotobuf/proto.UnmarshalJSONEnum函数的典型用法代码示例。如果您正苦于以下问题:Golang UnmarshalJSONEnum函数的具体用法?Golang UnmarshalJSONEnum怎么用?Golang UnmarshalJSONEnum使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了UnmarshalJSONEnum函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: UnmarshalJSON
func (x *EDotaClientMessages) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(EDotaClientMessages_value, data, "EDotaClientMessages")
if err != nil {
return err
}
*x = EDotaClientMessages(value)
return nil
}
示例2: UnmarshalJSON
func (x *ProcessPayload_Source) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ProcessPayload_Source_value, data, "ProcessPayload_Source")
if err != nil {
return err
}
*x = ProcessPayload_Source(value)
return nil
}
示例3: UnmarshalJSON
func (x *SIGNONSTATE) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(SIGNONSTATE_value, data, "SIGNONSTATE")
if err != nil {
return err
}
*x = SIGNONSTATE(value)
return nil
}
示例4: UnmarshalJSON
func (x *Method) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Method_value, data, "Method")
if err != nil {
return err
}
*x = Method(value)
return nil
}
示例5: UnmarshalJSON
func (x *Days) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Days_value, data, "Days")
if err != nil {
return err
}
*x = Days(value)
return nil
}
示例6: UnmarshalJSON
func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(FileOptions_OptimizeMode_value, data, "FileOptions_OptimizeMode")
if err != nil {
return err
}
*x = FileOptions_OptimizeMode(value)
return nil
}
示例7: UnmarshalJSON
func (x *CreateRequest_BindMount_Mode) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(CreateRequest_BindMount_Mode_value, data, "CreateRequest_BindMount_Mode")
if err != nil {
return err
}
*x = CreateRequest_BindMount_Mode(value)
return nil
}
示例8: UnmarshalJSON
func (x *EDOTAStatPopupTypes) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(EDOTAStatPopupTypes_value, data, "EDOTAStatPopupTypes")
if err != nil {
return err
}
*x = EDOTAStatPopupTypes(value)
return nil
}
示例9: UnmarshalJSON
func (x *TheTestEnum) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum")
if err != nil {
return err
}
*x = TheTestEnum(value)
return nil
}
示例10: UnmarshalJSON
func (x *PlayerAction_Action) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(PlayerAction_Action_value, data, "PlayerAction_Action")
if err != nil {
return err
}
*x = PlayerAction_Action(value)
return nil
}
示例11: 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
}
示例12: UnmarshalJSON
func (x *ENetworkDisconnectionReason) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ENetworkDisconnectionReason_value, data, "ENetworkDisconnectionReason")
if err != nil {
return err
}
*x = ENetworkDisconnectionReason(value)
return nil
}
示例13: UnmarshalJSON
func (x *Envelope_EventType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Envelope_EventType_value, data, "Envelope_EventType")
if err != nil {
return err
}
*x = Envelope_EventType(value)
return nil
}
示例14: UnmarshalJSON
func (x *GCConnectionStatus) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(GCConnectionStatus_value, data, "GCConnectionStatus")
if err != nil {
return err
}
*x = GCConnectionStatus(value)
return nil
}
示例15: UnmarshalJSON
func (x *ConfChangeType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ConfChangeType_value, data, "ConfChangeType")
if err != nil {
return err
}
*x = ConfChangeType(value)
return nil
}