command
module
Version:
v0.0.0-...-8e00ae7
Opens a new window with list of versions in this module.
Published: Jul 4, 2018
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
reportd
An easy report server for generate html or json from database.
Install
go get -u github.com/nadoo/reportd
Build
cd $GOPATH/src/github.com/nadoo/reportd
go build
Config
# Listen Address: "ip:port" OR ":port"(listen on all interfaces)
Listen = ":8080"
# Database Type: "mysql" OR "postgres"
DBType = "mysql"
# Database connection string
DBConn = "user:password@tcp(127.0.0.1:3306)/database?charset=utf8&autocommit=true" # mysql
#DBConn = "postgres://user:password@127.0.0.1:5432/database?sslmode=disable" # postgres
[[Reports]]
Title = "Report 1"
Sql = """SELECT
s.song_id AS SongID
,s.song_name
FROM m_song s
LIMIT 1;
"""
[[Reports]]
Title = "Report 2"
Params = true
Sql = """SELECT
s.song_id,
s.song_name
FROM m_song s
WHERE s.song_artist_only IN (:artists);
"""
#[[Reports]]
#Title = "Report 3"
#Params = true
#Sql = """SELECT
# s.song_id,
# s.song_name
# FROM m_song s
# WHERE s.song_artist_only = :artist1 OR s.song_artist_only = :artist2;
#"""
Usage
- Run the program:
nohup ./reportd &
- View in the browser:
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.