In order to execute the program, you need to have psql
installed in your system:
Using Linux env:
sudo apt install postgresql
-> installs the psql
sudo -u postgres psql
-> sudo into user name as postgress
psql --version
-> checks version
export RESC_DB_DSN='postgres://USER_NAME:YOUR_PWD@localhost/DB_NAME'
psql $RESC_DB_DSN
psql --host=localhost --dbname=DB_NAME --username=USER_NAME
Then exec into that and create the table as below
CREATE TABLE IF NOT EXISTS resources (
id SERIAL PRIMARY KEY NOT NULL,
title varchar(255) NOT NULL,
category varchar(32) NOT NULL,
status varchar(15) NOT NULL,
types varchar(10) NOT NULL,
content text,
file_link varchar(255) DEFAULT NULL,
created_by int NOT NULL,
created_at bigint NOT NULL,
updated_by int NOT NULL,
updated_at bigint NOT NULL
);
Steps to run the source code:
go mod tidy
-> Download the required dependencies
go run main.go
-> Runs the App
Inspired by CERN Collaboration tracks and generic functions
Our API enables you to make use of managing and accessing your resources for storing PDF, TXT files and images [Blogs]
Built around Gin-Gonic framework
How to configure our service api with integrating generic function
API configuration and Generic function and types
Go Generic function and its use of any
type
To integrate with UI and setup kubernetes cluster