• Stars
    star
    72
  • Rank 438,337 (Top 9 %)
  • Language
    Go
  • License
    GNU General Publi...
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple CRUD Application with Go, Gorilla/mux, MariaDB, Redis.

Simple CRUD App w/ Gorilla/Mux, MariaDB, Redis

Go Report Card CodeFactor

NOTE

This project is not longer maintained. I'll make a new better project.

Features

Basic CRUD operations (Create-Read-Update-Delete).

Database Scheme

Data table:

create table products
(
    id           int(11) unsigned auto_increment primary key,
    name         tinytext null,
    manufacturer tinytext null
);

You can generate data from http://filldb.info/.

Users table:

CREATE TABLE `users` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `username` text NOT NULL,
  `saltedpassword` text NOT NULL,
  `salt` text NOT NULL,
  PRIMARY KEY (`id`)
);

Password+Salt is encrypted with bcryptwith 10 rounds and stored in saltedpasswordcolumn.

Caching

You can edit cache time from this line:

err = a.Cache.Set(r.RequestURI, content, 10*time.Minute).Err()

Example Requests

To get all entries from table:

curl --user user1:pass1 127.0.0.1:8000/api/products/list

To get an entry with id (where id equals 10):

curl --user user1:pass1 127.0.0.1:8000/api/products/10

To create an entry:

curl --header "Content-Type: application/json" \
     --request POST \
     --data '{"name": "ABC", "manufacturer": "ACME"}' \
	 --user user1:pass1 127.0.0.1:8000/api/products/new

To update an entry:

curl --request PUT \ 
     --data '{"name": "ABC", "manufacturer": "ACME"}' \ 
     --user user1:pass1 127.0.0.1:8000/api/products/11

To delete an entry:

curl --request DELETE --user user1:pass1 127.0.0.1:8000/api/products/10

More Repositories

1

QuantumComputingExamples

Quantum computing examples with QISKit.
Python
77
star
2

Cpp-Examples

Numerical C++ examples.
C++
43
star
3

Statistical-Modeling-Examples

Basic statistical modelling examples.
R
41
star
4

QuantitaveFinanceExamplesPy

Financial analysis, algorithmic trading, portfolio optimization examples with Python (DISCLAIMER - No Investment Advice Provided, YASAL UYARI - Yatırım tavsiyesi değildir).
Jupyter Notebook
41
star
5

DeepLearningExamples

Deep learning examples with Python and Tensorflow & Keras.
Python
23
star
6

NumericalAlgorithms.jl

[DEPRECATED] Statistics & Numerical algorithms implemented in Julia.
Julia
12
star
7

AnomalyDetectionCpp

Simple anomaly detection for univariate time series data.
C++
11
star
8

AnomalyDetectionShiny

Shiny app for anomaly detection using AnomalyDetection package.
R
10
star
9

SimpleGRPCApp

Simple GRPC app with Golang.
Go
9
star
10

DataSciencewithPython

Data Science examples
Jupyter Notebook
8
star
11

VHDLExamples

VHDL examples.
VHDL
8
star
12

Numerical-Methods-in-Fortran

[WIP] Numerical methods implemented in Fortran.
Fortran
5
star
13

UnitTestCpp

Simple header-only C++ library for unit-testing.
C++
5
star
14

svelte-visualization

Earthquake visualization with Svelte.
JavaScript
4
star
15

SimpleCRUDAppNetCore

Simple CRUD Web API example with Swagger in C# and .Net Core 3.0.
C#
4
star
16

PneumoniaDetectionDeepLearning

Pneumonia detection using deep learning with Python and Tensorflow/Keras.
Python
4
star
17

svelte-todo

Todo App with Svelte.
JavaScript
3
star
18

SentimentAnalysisTurkish

Sentiment analysis in Turkish with R.
R
3
star
19

Machine-Learning-Examples

Basic Machine Learning Examples.
R
3
star
20

mrtkp9993

2
star
21

SvelteAuth

Svelte Auth0 authentication example.
JavaScript
2
star
22

bayesciistatistik

Bayesci istatistiÄŸe giriÅŸ.
HTML
2
star
23

mrtkp9993.github.io

My personal webpage.
HTML
2
star
24

functional_programming

Functional Programming Examples.
Haskell
1
star
25

MyDsProjects

My data science projects.
TypeScript
1
star
26

streamlit-stock-performance

Analyze financial instruments' past performances with a just few clicks.
Python
1
star
27

DistributionPlotsSAS

Various probability density/mass function graphs with SAS.
SAS
1
star
28

TDAShiny

Persistance and barcode diagrams using TDAstats package.
R
1
star
29

Bayesian-Inference

Bayesci çıkarıma giriş.
Jupyter Notebook
1
star
30

CompNeuroMatlab

Computational neuroscience examples with MATLAB/GNU Octave.
MATLAB
1
star
31

MathProg

Automated theorem proving, Logic Programming, Optimization examples.
Python
1
star
32

Isabelle-HOL-Examples

Isabelle/HOL examples.
Isabelle
1
star
33

tradesly-supres

Calculate support and resistance levels for a given ticker.
Python
1
star
34

tradesly-cpat

Backtest Candlestick Patterns
Python
1
star
35

autodiff

Reverse-mode automatic differentation in Python.
Python
1
star