Skip to content

HyperNaser/gobank

Repository files navigation

Basic Commands

Create gobank cluster via:

make cluster

Delete gobank cluster via:

make delete_cluster_gobank

Make initial setup via:

make setup

Create postgres database cluster credentials via:

make create_creds

or manual via (make sure namespace exists first):

kubectl create secret generic db-creds --namespace gobank --from-literal=username=root --from-literal=password='YOUR_PASSWORD_HERE'

Create namespace via:

make namespace

Delete postgres database cluster credentials via:

kubectl delete secret db-creds

Check pods via:

kubectl get pods

Delete a deployment via:

kubectl delete deployment DEPLOYMENT_NAME

Apply a deployment yaml file via:

kubectl apply -f PATH_TO_YAML

Apply all cluster configs:

make apply_cluster_configs

Create postgres database cluster via:

make cluster_db

Create gobank-api cluster via:

make cluster_gobank_api

Start cluster via:

make cluster_start

Stop cluster via:

make cluster_stop

Expose a port to database via:

kubectl port-forward svc/gobank-db-rw 5432:5432

Generate db docs via:

tbls doc

Generate swagger docs via:

swag init -g main.go -o docs

Make db migration via:

migrate create -ext sql -dir db/migration -seq <migration_name>

About

Project for purposes of learning API mock testing and development in Go

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages