Golang appengine_internal-github.com-golang-protobuf-proto.UnmarshalJSONEnum类(方法)实例源码

下面列出了Golang appengine_internal-github.com-golang-protobuf-proto.UnmarshalJSONEnum 类(方法)源码代码实例,从而了解它的用法。

作者:AppScal    项目:appscal   
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
}

作者:AppScal    项目:appscal   
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
}

作者:AppScal    项目:appscal   
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
}

作者:AppScal    项目:appscal   
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
}

作者:AppScal    项目:appscal   
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
}

作者:AppScal    项目:appscal   
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
}

作者:AppScal    项目:appscal   
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
}

作者:AppScal    项目:appscal   
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
}

作者:AppScal    项目:appscal   
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
}


问题


面经


文章

微信
公众号

扫码关注公众号