dccn-tg / tg-toolset-golang

Go tools and libraries for interacting various services managed by the TG
0 stars 0 forks source link

TG toolset golang

CLI tools and re-usable libraries for interacting and managing various ICT services provided by the DCCN technical group, written in Golang.

Code structure

Currently, the whole package is divided into a few parts, each provides a set of CLI tools. They are:

Various CLIs take a YAML-based configuration file (via the -c option) for setting up connections to, e.g., project database, filers, etc.. An example YAML file is provided here; and the codes that "objectize" the YAML file are located in the pkg/config directory.

Most of the re-usable libraries are written to support the CLI tools listed above. Those libraries are organised in various pkg directories:

Build

To build the CLIs, simply run:

make

After the build, the executable binaries are located in ${GOPATH}/bin directory. If ${GOPATH} is not set in the environment, default is ${HOME}/go.

Release

The Makefile has a target to build a GitHub release with an RPM package as the release asset. For making a GitHub release X.Y.Z, one does:

VERSION=X.Y.Z make github-release

The GitHub personal access token is required for interacting with the GitHub APIs.

Run

All CLI commands have a -h option to print out a brief usage of the command.