A Golang solution of tools for building a full stack web application.
Below are some targeted goals:
- Webserver Goals
- Http & Https & HTTP 2.0 with Golang 1.9 and gin-gonic/gin. See GoCore/app documentation)
- Basic configuration helpers with a gin-gonic server
- Exposing the gin-gonic Router engine to your application for custom routes.
- Setting up dynamic routes through controller registration APIs (in the app/api package) and reflection to invoke your methods with interfaces
- Websocket WSS and WS support through github.com/gorilla/websocket
- Replying to messages or Broadcasting to all
- Giving you access to iterate your connected sockets
- Managing deleted sockets and providing a way to safely iterate through connected sockets to publish messages to all or some sockets
- Http & Https & HTTP 2.0 with Golang 1.9 and gin-gonic/gin. See GoCore/app documentation)
- Database Goals. Provide Model/structs/ORM support and drivers for the following (only for use with GoCore full apps):
- Supported databases:
- MongoDB
- BoltDB
- Create SQL Schema (DDL) from JSON Configuration.
- Generated golang structs and methods will also allow customization files to be injected inside your models/v1/model package
- Create Golang ORM packages for RDBMS Transactions & Queries.
- Create a bootstrapping system to seed data in various configurations and data dumping formats
- Recursive Joins with foreign and primary keys in mongo or bolt.
- A pubsub store (core/store) for mongo or bolt to allow for interfaces to subscribe to changes in the database or to save changes to the database with either golang or a javascript client.
- Supported databases:
- General application toolbox and file utilities
- Some basic crypto functions in the github.com/DanielRenne/core/crypto package
- Utility functions for versioning, hexadecimals, strings, human directory sizes, printable ascii/emojis, data type conversions inside of github.com/DanielRenne/GoCore/core/extensions
- Basic path helpers in github.com/DanielRenne/GoCore/core/path
- Utility functions for managing files and directories for getting all files in directories, copying and removing directories, reading files and also parsing interfaces into json, unGizipping files, and Untarring and Taring files natively inside of go with github.com/DanielRenne/core/extensions/
fileExtensions.go
andunix.go
- A simple logger with logging with colors, goRoutine logging, tailing files, and measuring time of execution in github.com/DanielRenne/core/logger package
- A "core" package which currently has some debug Dump tools for dumping structs and variables to the console in a readable format
- Channel management queues and pubsub functions
- A simple channel management queue system for managing goRoutines and channels in github.com/DanielRenne/GoCore/core/channels package
- pubsub package for publishing to subscribers in github.com/DanielRenne/GoCore/core/pubsub package
- Atomic file locking functions (on many common types) for file system operations on thread safe files in github.com/DanielRenne/GoCore/core/atomicTypes package
- Adds a Get() and Set() method with a mutex lock to the following types:
- AtomicString
- AtomicUInt16
- AtomicUInt32
- AtomicByteArray
- AtomicFloat64
- AtomicBoolArray
- AtomicBool (ToggleTrue returning if changed to true)
- AtomicInt (Add, Increment, Decrement)
- Adds a Get() and Set() method with a mutex lock to the following types:
-
To start a new project with go modules (after go 1.13) run the following steps in a new console window. Note, this just gets all packages indirectly and they will be removed in your app as you begin to use them.
go mod init yourProject/packageName
go get github.com/DanielRenne/GoCore
There are three options to start a webserver. GoCoreLite (just a gin-gonic server with a gorilla websocket where you pass the port you wish), GoCoreFull ( which assumes usages of our model and ORM with mongo or boltDB ), or GoCoreCreateApp (full front-end examples with a backend webserver).
-
GoCore full docs are available at here
-
GoCoreLite full docs are available here
-
GoCoreCreateApp full docs are available here