Load configuration file. misc helpers HTTP API to control probe service for representing collected data. HTTP client with timeouts. Client from standard library lacks support of timeouts then we use this one. Code taken from https://gist.github.com/dmichael/5710968 and also explained here http://stackoverflow.com/questions/16895294/how-to-set-timeout-for-http-get-requests-in-golang Stream parsers and keepers. OBSOLETED by webui-report.go Web reports generator Load configuration file. The code keeps streams statistics and program internal statistics. Statistics output to files and to JSON HTTP API. OBSOLETED by templates/*.tmpl Templates for webui Web UI. Reports generator Integration with Zabbix monitoring tool
Package helper: common project provides commonly used helper utility functions, custom utility types, and third party package wrappers. common project helps code reuse, and faster composition of logic without having to delve into commonly recurring code logic and related testings. common project source directories and brief description: + /ascii = helper types and/or functions related to ascii manipulations. + /crypto = helper types and/or functions related to encryption, decryption, hashing, such as rsa, aes, sha, tls etc. + /csv = helper types and/or functions related to csv file manipulations. + /rest = helper types and/or functions related to http rest api GET, POST, PUT, DELETE actions invoked from client side. + /tcp = helper types providing wrapped tcp client and tcp server logic. - /wrapper = wrappers provides a simpler usage path to third party packages, as well as adding additional enhancements. /helper-conv.go = helpers for data conversion operations. /helper-db.go = helpers for database data type operations. /helper-emv.go = helpers for emv chip card related operations. /helper-io.go = helpers for io related operations. /helper-net.go = helpers for network related operations. /helper-num.go = helpers for numeric related operations. /helper-other.go = helpers for misc. uncategorized operations. /helper-reflect.go = helpers for reflection based operations. /helper-regex.go = helpers for regular express related operations. /helper-str.go = helpers for string operations. /helper-struct.go = helpers for struct related operations. /helper-time.go = helpers for time related operations. /helper-uuid.go = helpers for generating globally unique ids.
Package gondulapi provides the framework for building a HTTP REST-API backed by a Postgresql Database. The package can be split into three: 1. The HTTP bit, found in receiver/. This deals with accepting HTTP requests, parsing requests and mapping them to data types. It ensures proper division of labour, and makes it less easy to make inconsistent APIs by enforcing that if you GET something on an URL, PUT or POST to the same URL will accept the exact same data type back. In other words, you can do: And it will do what you expect, assuming the datastructure implements both the Getter-interface and the Putter interface. 2. The SQL bit, found in db/. This is an attempt to use reflection to avoid having to write database queries by hand. It is not meant to cover 100% of all SQL access. Since it makes mapping a Go data type to an SQL table easy, it is meant to inspire good database models, where the API can mostly just get items back and forth. 3. "Misc" - or maybe I should say, the actual Gondul API. Which at this moment isn't actually written. Some other bits fall under this category though, such as config file management and logging. Not very exotic.