Skip to content

v4.1

Latest
Compare
Choose a tag to compare
@zeroc0d3 zeroc0d3 released this 19 Mar 00:09
· 1344 commits to master since this release
bdaed75

Golang Deployment

Kubernetes Deployment for Simple Golang API

goreport all contributors tags docker pulls download all download latest view clone issues pull requests forks stars license


Available Tags

Alpine

Image name Size
devopscorner/bookstore:latest docker image size default-latest latest
devopscorner/bookstore:alpine docker image size latest
devopscorner/bookstore:alpine-latest docker image size
devopscorner/bookstore:alpine-3.15 docker image size
devopscorner/bookstore:go1.19-alpine3.15 docker image size
devopscorner/bookstore:go1.19.3-alpine3.15 docker image size
devopscorner/bookstore:alpine-3.16 docker image size
devopscorner/bookstore:go1.19-alpine3.16 docker image size
devopscorner/bookstore:go1.19.5-alpine3.16 docker image size
devopscorner/bookstore:alpine-3.17 docker image size
devopscorner/bookstore:go1.19-alpine3.17 docker image size
devopscorner/bookstore:go1.19.5-alpine3.17 docker image size

Alpine (Depreciated)

Image name Size
devopscorner/bookstore:go1.18-alpine3.15 docker image size
devopscorner/bookstore:go1.18-alpine3.16 docker image size

Changelog GO App

version 4.1

  • All features in version 4.0
  • Refactoring routes for endpoint login into LoginController (validate JSON Token & rendering result token)
  • Refactoring folder Repository Pattern with View for rendering JSON parse response and Const for error response
        .
        ├── .env
        ├── .env.example
        ├── config
        │   ├── config.go
        │   ├── config_test.go
        │   └── const.go
        ├── controller
        │   ├── book_controller.go
        │   ├── book_controller_test.go
        │   ├── login_controller.go
        │   └── login_controller_test.go
        ├── driver
        │   ├── db.go
        │   ├── dynamo.go
        │   ├── mysql.go
        │   ├── psql.go
        │   └── sqlite.go
        ├── go-bookstore.db
        ├── go.mod
        ├── go.sum
        ├── main.go
        ├── main_test.go
        ├── middleware
        │   ├── auth_middleware.go
        │   └── auth_middleware_test.go
        ├── migrate_book.go.example
        ├── migrate_book_dynamo.go.example
        ├── model
        │   └── book.go
        ├── repository
        │   └── book_repository.go
        ├── routes
        │   └── book_routes.go
        └── view
            ├── book_view.go
            ├── error_view.go
            └── login_view.go
    
        9 directories, 29 files
    
  • Added Const definition config/const.go --> Internationalization (i18n)
    ERR_INVALID_BOOK_ID         = "Invalid book ID"
    ERR_INVALID_REQUEST_PAYLOAD = "Invalid request payload"
    ERR_INVALID_CREDENTIALS     = "Invalid credentials"
    ERR_BOOK_NOT_FOUND          = "Book not found!"
    ERR_UPDATE_BOOK             = "Failed to update book"
    ERR_DELETE_BOOK             = "Failed to delete book"
    
  • Added Amazon CodeCatalyst workflow CI/CD in .codecatalyst folder
  • Refactoring middleware routes
  • Added unit test Postman collection

version 4.0

  • All features in version 3.5

  • Refactoring folder Repository Pattern with multiple driver ORM

        .
        ├── config
        │   ├── config.go
        │   └── config_test.go
        ├── controller
        │   ├── book_controller.go
        │   ├── book_controller_test.go
        │   ├── login_controller.go
        │   └── login_controller_test.go
        ├── driver
        │   ├── db.go
        │   ├── dynamo.go
        │   ├── mysql.go
        │   ├── psql.go
        │   └── sqlite.go
        ├── go-bookstore.db
        ├── go.mod
        ├── go.sum
        ├── main.go
        ├── main_test.go
        ├── middleware
        │   ├── auth_middleware.go
        │   └── auth_middleware_test.go
        ├── migrate_book.go.example
        ├── migrate_book_dynamo.go.example
        ├── model
        │   └── book.go
        ├── repository
        │   └── book_repository.go
        └── routes
            └── book_routes.go
    
        8 directories, 23 files
    
  • Refactoring default environment variable

    GIN_MODE=release
    APP_URL=http://localhost
    APP_PORT=8080
    DB_CONNECTION=sqlite
    DB_REGION=ap-southeast-1
    DB_HOST=localhost
    DB_PORT=
    DB_DATABASE=go-bookstore.db
    DB_USERNAME=root
    DB_PASSWORD=
    JWT_AUTH_USERNAME=devopscorner
    JWT_AUTH_PASSWORD=DevOpsCorner@2023
    JWT_SECRET=s3cr3t
    
  • Added multi driver database connection via ORM

    DB_CONNECTION=sqlite
    ---
    Available for:
    - sqlite
    - mysql
    - postgres
    - dynamo
    
  • DynamoDB Connection

    DB_CONNECTION=dynamo
    ---
    DB_DATABASE --> Dynamo Table
    DB_REGION   --> Dynamo Region