当前位置: 首页>>代码示例>>Golang>>正文


Golang proto.UnmarshalJSONEnum函数代码示例

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


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

示例1: UnmarshalJSON

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

示例2: UnmarshalJSON

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

示例3: UnmarshalJSON

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

示例4: UnmarshalJSON

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

示例5: 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
}
开发者ID:AppScale,项目名称:appscale,代码行数:8,代码来源:blobstore_service.pb.go

示例6: UnmarshalJSON

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

示例7: 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
}
开发者ID:AppScale,项目名称:appscale,代码行数:8,代码来源:urlfetch_service.pb.go

示例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
}
开发者ID:AppScale,项目名称:appscale,代码行数:8,代码来源:app_identity_service.pb.go

示例9: UnmarshalJSON

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


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