All Projects → averageflow → godmt

averageflow / godmt

Licence: MIT license
Tool that can parse Go files into an abstract syntax tree and translate it to several programming languages.

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to godmt

Joi2gql
Conversion of Joi schemas into GraphQL data types
Stars: ✭ 11 (-73.81%)
Mutual labels:  schema, models
Awesome Python Models
A curated list of awesome Python libraries, which implement models, schemas, serializers/deserializers, ODM's/ORM's, Active Records or similar patterns.
Stars: ✭ 124 (+195.24%)
Mutual labels:  schema, model
Vue Rawmodel
RawModel.js plugin for Vue.js v2. Form validation has never been easier!
Stars: ✭ 79 (+88.1%)
Mutual labels:  schema, model
System Designer
A low-code development platform for creating systems
Stars: ✭ 578 (+1276.19%)
Mutual labels:  schema, model
to-json-schema
Converts JS objects to JSON Schema
Stars: ✭ 83 (+97.62%)
Mutual labels:  converter, schema
Meteor Astronomy
Model layer for Meteor
Stars: ✭ 608 (+1347.62%)
Mutual labels:  schema, model
System Runtime
A JavaScript library that runs systems
Stars: ✭ 83 (+97.62%)
Mutual labels:  schema, model
tyshemo
A javascript runtime data type checking system and morden reactive state management model.
Stars: ✭ 70 (+66.67%)
Mutual labels:  schema, model
schema2ldif
Schema 2 ldif : tool to convert .schema to .ldif files and mange them live into an openldap server
Stars: ✭ 14 (-66.67%)
Mutual labels:  converter, schema
Trilogy
TypeScript SQLite layer with support for both native C++ & pure JavaScript drivers.
Stars: ✭ 195 (+364.29%)
Mutual labels:  schema, model
Plank
A tool for generating immutable model objects
Stars: ✭ 449 (+969.05%)
Mutual labels:  schema, models
felicity
Javascript object constructors and sample data based on Joi schema.
Stars: ✭ 107 (+154.76%)
Mutual labels:  schema, models
Skema
🛰 Skema provides a handy & composable way to validate / transform / purify the input data.
Stars: ✭ 359 (+754.76%)
Mutual labels:  schema, model
Mithril Data
A rich data model library for Mithril javascript framework
Stars: ✭ 17 (-59.52%)
Mutual labels:  schema, model
Structure
A simple schema/attributes library built on top of modern JavaScript
Stars: ✭ 292 (+595.24%)
Mutual labels:  schema, model
Data Models
🔠 Code and specifications to support harmonized data models
Stars: ✭ 79 (+88.1%)
Mutual labels:  schema, models
vue-example
Vue.js example application (server-side rendering, router, vuex store, form validation, i18n & l10n)
Stars: ✭ 62 (+47.62%)
Mutual labels:  schema, models
modelsafe
A type-safe data modelling library for TypeScript
Stars: ✭ 13 (-69.05%)
Mutual labels:  schema, model
Framework
Strongly-typed JavaScript object with support for validation and error handling.
Stars: ✭ 136 (+223.81%)
Mutual labels:  schema, model
TeslaKit
Elegant Tesla API in Swift
Stars: ✭ 47 (+11.9%)
Mutual labels:  model, models

GoDMT

Build Go Report Card PkgGoDev Maintainability codecov License

GoDMT, the one and only Go Data Model Translator. The goal of this project is to provide a tool that can parse Go files that include var, const, map, struct and type into an abstract syntax tree, aka AST.

That AST will then be transformed into data models for several programming languages. Currently GoDMT can perform translations to:

  • TypeScript
  • Swift (using Decodable structs)
  • JSON
  • PHP

Some small adjustments may need to be made to integrate the output into a project, but this should already save you a lot of time and hassle, and will help you stay in sync with the Go version of your data models, in other languages. Comments will be carried over 😉.

Currently, the tested operating systems are:

  • Linux (amd64)
  • FreeBSD (amd64)
  • macOS (amd64)
  • Windows (amd64)

Feel free to expand this list if you have successfully used the tool in other environments. You will find pre-compiled binaries of the tool in the releases page.

Talk is cheap, show code

Feel free to browse some examples that I am happy to provide here:

Usage

See the CLI Usage wiki page for more details on using the tool.

See the Tags and Name Conversion section to understand more about how entities get parsed and converted to other languages.

Building

To build this application as a binary simply navigate to cmd/godmt and run go build.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].