本文整理匯總了Golang中github.com/nildev/account/Godeps/_workspace/src/github.com/golang/protobuf/proto.UnmarshalJSONEnum函數的典型用法代碼示例。如果您正苦於以下問題:Golang UnmarshalJSONEnum函數的具體用法?Golang UnmarshalJSONEnum怎麽用?Golang UnmarshalJSONEnum使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了UnmarshalJSONEnum函數的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: UnmarshalJSON
func (x *MemcacheIncrementRequest_Direction) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(MemcacheIncrementRequest_Direction_value, data, "MemcacheIncrementRequest_Direction")
if err != nil {
return err
}
*x = MemcacheIncrementRequest_Direction(value)
return nil
}
示例2: UnmarshalJSON
func (x *PayloadType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(PayloadType_value, data, "PayloadType")
if err != nil {
return err
}
*x = PayloadType(value)
return nil
}
示例3: 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
}
示例4: UnmarshalJSON
func (x *BlobstoreServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(BlobstoreServiceError_ErrorCode_value, data, "BlobstoreServiceError_ErrorCode")
if err != nil {
return err
}
*x = BlobstoreServiceError_ErrorCode(value)
return nil
}
示例5: UnmarshalJSON
func (x *ImagesServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ImagesServiceError_ErrorCode_value, data, "ImagesServiceError_ErrorCode")
if err != nil {
return err
}
*x = ImagesServiceError_ErrorCode(value)
return nil
}
示例6: UnmarshalJSON
func (x *URLFetchRequest_RequestMethod) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(URLFetchRequest_RequestMethod_value, data, "URLFetchRequest_RequestMethod")
if err != nil {
return err
}
*x = URLFetchRequest_RequestMethod(value)
return nil
}
示例7: UnmarshalJSON
func (x *IsEnabledResponse_SummaryStatus) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(IsEnabledResponse_SummaryStatus_value, data, "IsEnabledResponse_SummaryStatus")
if err != nil {
return err
}
*x = IsEnabledResponse_SummaryStatus(value)
return nil
}
示例8: UnmarshalJSON
func (x *AppIdentityServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(AppIdentityServiceError_ErrorCode_value, data, "AppIdentityServiceError_ErrorCode")
if err != nil {
return err
}
*x = AppIdentityServiceError_ErrorCode(value)
return nil
}
示例9: UnmarshalJSON
func (x *ChannelServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ChannelServiceError_ErrorCode_value, data, "ChannelServiceError_ErrorCode")
if err != nil {
return err
}
*x = ChannelServiceError_ErrorCode(value)
return nil
}
示例10: UnmarshalJSON
func (x *RpcError_ErrorCode) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(RpcError_ErrorCode_value, data, "RpcError_ErrorCode")
if err != nil {
return err
}
*x = RpcError_ErrorCode(value)
return nil
}