protoc-gen-gotag - Add custom struct tags to protobuf generated structs

  •        979

Then struct tags can be added by running this command after the regular protobuf generation command. In the above example tags like graphql and xml will be added whereas existing tags such as json are replaced with the supplied values.

https://github.com/srikrsna/protoc-gen-gotag

Tags
Implementation
License
Platform

   




Related Projects

gomodifytags - Go tool to modify struct field tags

  •    Go

Go tool to modify/update field tags in structs. gomodifytags makes it easy to update, add or delete the tags in a struct field. You can easily add new tags, update existing tags (such as appending a new key, i.e: db, xml, etc..) or remove existing tags. It also allows you to add and remove tag options. It's intended to be used by an editor, but also has modes to run it from the terminal. Read the usage section below for more information.By default every change will be printed to stdout. So it's safe to run it and see the results of it. If you want to change it permanently, pass the -w (write) flag.

Refureku - Reflection library for C++

  •    C++

Refureku is a powerful C++17 RTTI free runtime reflection library based on Kodgen. It allows to retrieve information on namespaces, structs/classes, fields, methods, non-member variables, non-member functions, enums and enum values at runtime.

yaml - A better way to marshal and unmarshal YAML in Golang

  •    Go

A wrapper around go-yaml designed to enable a better way of handling YAML when marshaling to and from structs. In short, this library first converts YAML to JSON using go-yaml and then uses json.Marshal and json.Unmarshal to convert to or from the struct. This means that it effectively reuses the JSON struct tags as well as the custom JSON methods MarshalJSON and UnmarshalJSON unlike go-yaml. For a detailed overview of the rationale behind this method, see this blog post.

fako - Struct Faker for Go

  •    Go

Fako is a library intended to fake Golang structs with fake but coherent data, Fako maps struct field tags and generates fake data accordingly. We find it useful when writing specs to generate fake database data, hope you too.

envconfig - Golang library for managing configuration data from environment variables

  •    Go

Envconfig supports the use of struct tags to specify alternate, default, and required environment variables.Envconfig has automatic support for CamelCased struct elements when the split_words:"true" tag is supplied. Without this tag, AutoSplitVar above would look for an environment variable called MYAPP_AUTOSPLITVAR. With the setting applied it will look for MYAPP_AUTO_SPLIT_VAR. Note that numbers will get globbed into the previous word. If the setting does not do the right thing, you may use a manual override.


go-envconfig - A Go library for parsing struct tags from environment variables.

  •    Go

Envconfig populates struct field values based on environment variables or arbitrary lookup functions. It supports pre-setting mutations, which is useful for things like converting values to uppercase, trimming whitespace, or looking up secrets. Note: Versions prior to v0.2 used a different import path. This README and examples are for v0.2+.

ts-protoc-gen - Protocol Buffers Compiler (protoc) plugin for TypeScript and gRPC-Web.

  •    TypeScript

This repository contains a protoc plugin that generates TypeScript declarations (.d.ts files) that match the JavaScript output of protoc --js_out=import_style=commonjs,binary. This plugin can also output service definitions as both .js and .d.ts files in the structure required by grpc-web. This plugin is tested and written using TypeScript 2.7.

prototool - Your Swiss Army Knife for Protocol Buffers

  •    Go

Protobuf is one of the best interface description languages out there - it's widely adopted, and after over 15 years of use, it's practically bulletproof. However, working with Protobuf and maintaining consistency across your Protobuf files can be a pain - protoc, while being a tool that has stood the test of time, is non-trivial to use, and the Protobuf community has not developed common standards with regards to stub generation. Prototool aims to solve this by making working with Protobuf much simpler. Prototool accomplishes this by downloading and calling protoc on the fly for you, handing error messages from protoc and your plugins, and using the generated FileDescriptorSets for internal functionality, as well as wrapping a few great external libraries already in the Protobuf ecosystem.

protoc-gen-doc - Documentation generator plugin for Google Protocol Buffers

  •    Go

This is a documentation generator plugin for the Google Protocol Buffers compiler (protoc). The plugin can generate HTML, JSON, DocBook and Markdown documentation from comments in your .proto files. It supports proto2 and proto3, and can handle having both in the same context (see examples for proof).

protobuf-c - Protocol Buffers implementation in C

  •    C++

This is protobuf-c, a C implementation of the Google Protocol Buffers data serialization format. It includes libprotobuf-c, a pure C library that implements protobuf encoding and decoding, and protoc-c, a code generator that converts Protocol Buffer .proto files to C descriptor code, based on the original protoc. protobuf-c formerly included an RPC implementation; that code has been split out into the protobuf-c-rpc project. protobuf-c's mailing list is hosted on a Google Groups forum. Subscribe by sending an email to protobuf-c+subscribe@googlegroups.com.

kaitai_struct - Kaitai Struct: declarative language to generate binary data parsers in C++ / C# / Go / Java / JavaScript / Lua / Perl / PHP / Python / Ruby

  •    Shell

Kaitai Struct is a declarative language used for describing various binary data structures laid out in files or in memory: i.e. binary file formats, network stream packet formats, etc. The main idea is that a particular format is described in Kaitai Struct language only once and then can be compiled with a ksc into source files in one of the supported programming languages. These modules will include a generated code for a parser that can read described data structure from a file / stream and give access to it in a nice, easy-to-comprehend API.

kaitai_struct_formats - Kaitai Struct: library of binary file formats (.ksy)

  •    HTML

This repository constitutes a library of ready-made binary file format descriptions using Kaitai Struct language (.ksy). If you want to explore the repository, please visit Kaitai Struct format gallery — that's HTML rendition of this repository, which block diagrams, all the code compiled for all possible target languages, provided with usage examples and instructions, etc, etc.

structopt - Parse command line argument by defining a struct.

  •    Rust

Parse command line argument by defining a struct. It combines clap with custom derive. Find it on Docs.rs. You can also check the examples and the changelog.

swift-protobuf - Plugin and runtime library for using protobuf with Swift

  •    Swift

Apple's Swift programming language is a perfect complement to Google's Protocol Buffer ("protobuf") serialization technology. They both emphasize high performance and programmer safety. This project provides both the command-line program that adds Swift code generation to Google's protoc and the runtime library that is necessary for using the generated code. After using the protoc plugin to generate Swift code from your .proto files, you will need to add this library to your project.

metamagic - Simple Ruby on Rails plugin for creating meta tags.

  •    Ruby

Metamagic is a simple Ruby on Rails plugin for creating meta tags. It supports regular meta tags, OpenGraph (Facebook), Twitter Cards, and custom tags. See the changelog for changes in version 3.0.

struct - Xcode projects on steroids

  •    Ruby

struct is a tool for iOS and Mac developers to automate the creation and management of Xcode projects. Ever lamented over your unorganised project files? struct solves that by making your filesystem be your project structure. How it is on disk is how it is in your project. Simple.

structslop - structslop is a static analyzer for Go that recommends struct field rearrangements to provide for maximum space/allocation efficiency

  •    Go

Package structslop defines an Analyzer that checks struct can be re-arranged fields to get optimal struct size. You can run structslop either on a Go package or Go files, the same way as other Go tools work.

protobuf-swift - Google ProtocolBuffers for Apple Swift

  •    Swift

An implementation of Protocol Buffers in Swift. Protocol Buffers are a way of encoding structured data in an efficient yet extensible format. This project is based on an implementation of Protocol Buffers from Google. See the Google protobuf project for more information.






We have large collection of open source products. Follow the tags from Tag Cloud >>


Open source products are scattered around the web. Please provide information about the open source projects you own / you use. Add Projects.