Coder Social home page Coder Social logo

datamodel-command-go's Introduction

Command Data Model (go-lang version)

Command Data Model is for command of metadata. It will get you a easy expression of your data to send to micro service. And Also, It's good at expressing all data. because edgeAttributes can contain another edgeAttribute object.

Prerequisites

  • Go compiler

  • Set GOPATH to Project Path to use datamodel-command-go library

Installation

Enter as follows in linux command line

$ go get github.com/mgjeong/datamodel-command-go
$ cd $GOPATH/src/github.com/mgjeong/datamodel-command-go/formatter
$ go install

As a result, github.com/mgjeong/datamodel-command-go/formatter.a is generated in $GOPATH/pkg/[$GOOS_$GOARCH]

How to Use

To use the datamodel-command-go libraries you first need to import the libraries into your project :

import "github.com/mgjeong/datamodel-command-go/formatter"

You can Use data models(EdgeAttribute, EdgeElement, EdgeData) as below :

attr := formatter.EdgeAttribute{"[name]", "[dataType]", [value]}
attr.ConvertToEdgeAttribute()

You can Use encoder and decoder as below :

jsonString, err := formatter.EncodeEdgeAttributeToJsonString(&EdgeAttribute)
EdgeAttribute, err := formatter.EncodeEdgeAttributeToJsonString(&jsonString)

Unit test and code coverage report

  1. GOTO : ~/datamodel-command-go
  2. Run the script $ ./unittest.sh
  3. Open coverall.html in web browser

datamodel-command-go's People

Contributors

jpwhitemn avatar jwagantall avatar myeonggijeong avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.