module
Version:
v0.3.6
Opens a new window with list of versions in this module.
Published: Aug 24, 2020
License: Apache-2.0
Opens a new window with license information.
README
¶
Web-Service for Converting SIF to JSON & Vice Versa
Getting Started
-
Make sure golang dev package is available in your machine.
-
Run go get -u ./...
to update this project's dependencies.
Ignore any undefined: n3cfg.***
errors.
-
Build.
In 'build.sh', change 'password' in line "sudopwd='password'" to your real sudo/admin password & save.
Run build.sh 'paths of sif-spec(txt)'
.
e.g. run ./build.sh ./SIFSpec/3.4.6.txt ./SIFSpec/3.4.7.txt
to build services with SIF 3.4.6 & 3.4.7
-
Release.
Run release.sh 'dest-platform' 'dest-path'
.
e.g. run ./release.sh [linux64|win64|mac] ~/Desktop/sif2json/linux64/
-
Docker Deploy (local, only for linux64 platform server).
Make sure Docker
installed.
Jump into your release dest-path in above step.
e.g. jump into ~/Desktop/sif2json/linux64/
Run docker build --tag n3-sif2json .
to make docker image.
Run docker run --name sif2json --net host n3-sif2json:latest
to run docker image.
-
Test.
Make sure curl
installed.
Simple curl test scripts in test.sh.
Before running ./test.sh
, modify some params like URL (IP, PORT ...) if needed.
OR write your own curl test like 'test.sh'.
Prerequisites
SIF Specification Description File. It's text readable format, and at least contains:
-
Spec VERSION.
-
LIST, NUMERIC, BOOLEAN attribute type description.
-
Element TRAVERSE description.
Remind for who plays with this source
-
Make sure /config.toml [Cfg2JSON] [Cfg2SIF] are correct.
-
For UnitTest, Set /2JSON/config.toml [SIFCfgDir4LIST], [SIFCfgDir4NUM], [SIFCfgDir4BOOL] to ../
;
-
For UnitTest, Set /2SIF/config.toml [SIFSpecDir], [ReplCfgPath] to ../
.
-
For Server, Set /2JSON/config.toml [SIFCfgDir4LIST], [SIFCfgDir4NUM], [SIFCfgDir4BOOL] to ../../../
;
-
For Server, Set /2SIF/config.toml [SIFSpecDir], [ReplCfgPath] to ../../../
.
Directories
¶
Click to show internal directories.
Click to hide internal directories.