ES to Protobuf tool| Online ES Document to Protobuf Generator| GoTool online toolset

开发工具指南

The free online ES to Protobuf tool quickly converts Elasticsearch document structures into Protobuf entity classes. Support field mapping, automatic type conversion, and code generation to improve development efficiency.

使用说明

feature introduction

  1. Change the contents of properties in mapping to struct, as follows
{
	"mappings": {
		"properties": {
			"doc_id": {
				"type": "keyword"
			},
			"id": {
				"type": "long"
			},
			"path": {
				"type": "keyword"
			},
			"name": {
				"type": "text"
			},
			"url": {
				"type": "keyword"
			},
			"description": {
				"type": "text"
			},
			"created_time": {
				"type": "date",
				"format": "yyyy-MM-dd HH:mm:ss"
			}
		}
	}
}

After treatment

message Es2StructTmp {
  string created_time = 1;
  string description = 2;
  string doc_id = 3;
  int32 id = 4;
  string name = 5;
  string path = 6;
  string url = 7;
}