Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moemoe89/practicing-cassandra-golang
💾 This repo for practicing Cassandra using Golang (Gin Framework), Docker, Travis CI and Codecov
https://github.com/moemoe89/practicing-cassandra-golang
cassandra codecov docker gin gin-gonic go golang travis-ci
Last synced: 18 days ago
JSON representation
💾 This repo for practicing Cassandra using Golang (Gin Framework), Docker, Travis CI and Codecov
- Host: GitHub
- URL: https://github.com/moemoe89/practicing-cassandra-golang
- Owner: moemoe89
- License: mit
- Created: 2020-03-24T05:42:11.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-24T15:53:10.000Z (almost 5 years ago)
- Last Synced: 2024-11-14T14:24:05.344Z (about 1 month ago)
- Topics: cassandra, codecov, docker, gin, gin-gonic, go, golang, travis-ci
- Language: Go
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/moemoe89/practicing-cassandra-golang.svg?branch=master)](https://travis-ci.org/moemoe89/practicing-cassandra-golang)
[![codecov](https://codecov.io/gh/moemoe89/practicing-cassandra-golang/branch/master/graph/badge.svg)](https://codecov.io/gh/moemoe89/practicing-cassandra-golang)
[![Go Report Card](https://goreportcard.com/badge/github.com/moemoe89/practicing-cassandra-golang)](https://goreportcard.com/report/github.com/moemoe89/practicing-cassandra-golang)# PRACTICING-CASSANDRA-GOLANG #
Practicing Cassandra Using Golang (Gin Gonic Framework) with Go Mod as Programming Language, Cassandra as Database
## Directory structure
Your project directory structure should look like this
```
+ your_gopath/
|
+--+ src/github.com/moemoe89
| |
| +--+ practicing-cassandra-golang/
| |
| +--+ main.go
| + api/
| + routers/
| + ... any other source code
|
+--+ bin/
| |
| +-- ... executable file
|
+--+ pkg/
|
+-- ... all dependency_library required```
## Requirements
Go >= 1.11
## Setup and Build
* Setup Golang
* Setup Cassandra
* Under `$GOPATH`, do the following command :
```
$ mkdir -p src/github.com/moemoe89
$ cd src/github.com/moemoe89
$ git clone
$ mv practicing-cassandra-golang
```## Running Application
Make config file for local :
```
$ cp config-sample.json config-local.json
```
Build
```
$ go build
```
Run
```
$ go run main.go
```## How to Run with Docker
Make config file for docker :
```
$ cp config-sample.json config-docker.json
```
Build
```
$ docker-compose build
```
Run
```
$ docker-compose up
```
Stop
```
$ docker-compose down
```## How to Run Unit Test
Run
```
$ go test ./...
```
Run with cover
```
$ go test ./... -cover
```
Run with HTML output
```
$ go test ./... -coverprofile=c.out && go tool cover -html=c.out
```## License
MIT