
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
github.com/rabmarjan/monitoring-system-with-golang-rest-api-with-postgresql-and-sqlite
A Go based REST API with PostgreSQL and SQLite Database
-- Database: lumoswg
-- DROP DATABASE lumoswg;
CREATE DATABASE lumoswg
WITH OWNER = postgres
ENCODING = 'UTF8'
TABLESPACE = pg_default
LC_COLLATE = 'en_US.UTF-8'
LC_CTYPE = 'en_US.UTF-8'
CONNECTION LIMIT = -1;
-- Table: public.asset
-- DROP TABLE public.asset;
CREATE TABLE public.asset
(
oid character varying(128) NOT NULL,
organizationoid character varying(128) NOT NULL,
customeroid character varying(128) NOT NULL,
siteoid character varying(128) NOT NULL,
categoryoid character varying(128) NOT NULL,
manufactureroid character varying(128) NOT NULL,
modeloid character varying(128) NOT NULL,
assetname character varying(256) NOT NULL,
productserial character varying(256) NOT NULL,
assetid character varying(256),
purchasedate date,
shipmentdate date,
deliverydate date,
eoldate date,
eosdate date,
specificationjson text NOT NULL DEFAULT '{}'::text,
configurationjson text NOT NULL DEFAULT '{}'::text,
credentialjson text NOT NULL DEFAULT '{}'::text,
datajson text NOT NULL DEFAULT '{}'::text,
createdby character varying(128) NOT NULL DEFAULT 'System'::character varying,
createdon timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
updatedby character varying(128),
updatedon timestamp without time zone,
CONSTRAINT pk_asset PRIMARY KEY (oid)
)
WITH (
OIDS=FALSE
);
ALTER TABLE public.asset
OWNER TO postgres;
export GOPATH=$HOME/go
export GOROOT=/usr/lib/go-1.10
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
Monitoring-System-With-Golang-REST-API-with-PostgreSQL-and-SQLite
to goweb
cd $HOME/go/src
mkdir workspace
## put the goweb with all source code into workspace directory so directory will look like following
$HOME/go/src/workspace/goweb
## All source file should inside of the goweb directory
go get
localhost:9010/lumos/
localhost:9010/lumos/asset/asset/v1/get-list
go run main.go
curl -i -X POST -H "Content-Type: application/json" -d '{"header":{"requestId":"f130d221-4ae6-4d09-bf2e-75d4f194a469","requestType":"asset/asset/v1/get-list","requestClient":"lumos","requestSource":"curl","requestSourceService":"terminal","requestVersion":"1.0","requestTimeoutInSeconds":30,"requestRetryCount":0,"hopCount":1,"traceId":"171206IPLI","requestTime":"2018-09-11T08:20:39.778Z"},"meta":{},"body":{"searchParam":{"offSet":0,"limit":10}}}' http://localhost:9010/lumos/asset/asset/v1/get-list
CREATE TABLE asset
(
oid character varying(128) NOT NULL,
organizationoid character varying(128) NOT NULL,
customeroid character varying(128) NOT NULL,
siteoid character varying(128) NOT NULL,
categoryoid character varying(128) NOT NULL,
manufactureroid character varying(128) NOT NULL,
modeloid character varying(128) NOT NULL,
assetname character varying(256) NOT NULL,
productserial character varying(256) NOT NULL,
assetid character varying(256),
purchasedate date,
shipmentdate date,
deliverydate date,
eoldate date,
eosdate date,
specificationjson text DEFAULT '{}',
configurationjson text DEFAULT '{}',
credentialjson text DEFAULT '{}',
datajson text DEFAULT '{}',
createdby character varying(128) DEFAULT '',
createdon timestamp without time zone,
updatedby character varying(128) DEFAULT '',
updatedon timestamp without time zone,
CONSTRAINT pk_asset PRIMARY KEY (oid)
);
curl -i -X POST -H "Content-Type: application/json" -d '{"header":{"requestId":"f9f3dc67-e830-41b2-a45d-43cc3e3bb742","requestType":"asset/asset/sqlite/v1/save","requestClient":"lumos","requestSource":"curl","requestSourceService":"terminal","requestVersion":"1.0","requestTimeoutInSeconds":30,"requestRetryCount":0,"hopCount":1,"traceId":"171206IPLI","requestTime":"2018-09-11T09:05:38.199Z"},"meta":{},"body":{"oid":"120marjan27","organizationOid":"ORG-01","customerOid":"Cust-01","siteOid":"Site-01","categoryOid":"cat-01", "manufacturerOid":"OEM-01","modelOid":"AM-01","assetName":"1234asdf","productSerial":"123456789", "assetID":"1234","purchaseDate":"2018-07-31T10:51:00.603Z"}}' http://localhost:9010/lumos/asset/asset/sqlite/v1/save
curl -i -X POST -H "Content-Type: application/json" -d '{"header":{"requestId":"f130d221-4ae6-4d09-bf2e-75d4f194a469","requestType":"asset/asset/sqlite/v1/get-list","requestClient":"lumos","requestSource":"curl","requestSourceService":"terminal","requestVersion":"1.0","requestTimeoutInSeconds":30,"requestRetryCount":0,"hopCount":1,"traceId":"171206IPLI","requestTime":"2018-09-11T08:20:39.778Z"},"meta":{},"body":{"searchParam":{"offSet":0,"limit":10}}}' http://localhost:9010/lumos/asset/asset/sqlite/v1/get-list
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.