本文整理匯總了Golang中github.com/gogo/protobuf/proto.UnmarshalJSONEnum函數的典型用法代碼示例。如果您正苦於以下問題:Golang UnmarshalJSONEnum函數的具體用法?Golang UnmarshalJSONEnum怎麽用?Golang UnmarshalJSONEnum使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了UnmarshalJSONEnum函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: UnmarshalJSON
func (x *AuthError_ErrorType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(AuthError_ErrorType_value, data, "AuthError_ErrorType")
if err != nil {
return err
}
*x = AuthError_ErrorType(value)
return nil
}
示例2: UnmarshalJSON
func (x *ColumnType_Kind) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ColumnType_Kind_value, data, "ColumnType_Kind")
if err != nil {
return err
}
*x = ColumnType_Kind(value)
return nil
}
示例3: UnmarshalJSON
func (x *PeerType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(PeerType_value, data, "PeerType")
if err != nil {
return err
}
*x = PeerType(value)
return nil
}
示例4: UnmarshalJSON
func (x *PhproxydStatusT) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(PhproxydStatusT_value, data, "PhproxydStatusT")
if err != nil {
return err
}
*x = PhproxydStatusT(value)
return nil
}
示例5: UnmarshalJSON
func (x *SqlMode_BitPosition) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(SqlMode_BitPosition_value, data, "SqlMode_BitPosition")
if err != nil {
return err
}
*x = SqlMode_BitPosition(value)
return nil
}
示例6: 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
}
示例7: UnmarshalJSON
func (x *UserCmd) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(UserCmd_value, data, "UserCmd")
if err != nil {
return err
}
*x = UserCmd(value)
return nil
}
示例8: UnmarshalJSON
func (x *Genre) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Genre_value, data, "Genre")
if err != nil {
return err
}
*x = Genre(value)
return nil
}
示例9: UnmarshalJSON
func (x *Operation_Type) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Operation_Type_value, data, "Operation_Type")
if err != nil {
return err
}
*x = Operation_Type(value)
return nil
}
示例10: 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
}
示例11: UnmarshalJSON
func (x *Data_DataType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Data_DataType_value, data, "Data_DataType")
if err != nil {
return err
}
*x = Data_DataType(value)
return nil
}
示例12: UnmarshalJSON
func (x *TimeSeriesQueryDerivative) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(TimeSeriesQueryDerivative_value, data, "TimeSeriesQueryDerivative")
if err != nil {
return err
}
*x = TimeSeriesQueryDerivative(value)
return nil
}
示例13: UnmarshalJSON
func (x *Request_Color) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Request_Color_value, data, "Request_Color")
if err != nil {
return err
}
*x = Request_Color(value)
return nil
}
示例14: UnmarshalJSON
func (x *LogMessage_MessageType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(LogMessage_MessageType_value, data, "LogMessage_MessageType")
if err != nil {
return err
}
*x = LogMessage_MessageType(value)
return nil
}
示例15: UnmarshalJSON
func (x *Widget_Color) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Widget_Color_value, data, "Widget_Color")
if err != nil {
return err
}
*x = Widget_Color(value)
return nil
}