Golang application built on ent(Entity Framework for Go) and fiber

Overview

Golang ent(ity) framework example

This is a poor attempt to build a bootleg music streaming application with Golang using coding best practices. This code is for learning purposes only, please obtain a copy of the license before using part(s) of the code in production.

Structure

See README.md in each folder for documentation

|-pkg/*.go # Utilities shared across the app
|-config  # All config parsing and loading happens here
  -----/config-local.yaml
  -----/*.go
|-containers # Docker-compose & K8s setup
|-ent
  ---/schema/*.go # Schema definitions
  ---/*.go
|-internal # Actual app logic
|-server/*.go # Bootstrapping the server
|-/.main.go # Application entry point
|-/.Makefile # Small scripts to help you build the app

Starting the app (locally)

Start containers

You might need to create a volume that Postgres needs to attach to first;execute the command docker volume create --name entexample-volume -d local. PLEASE DO THIS ONLY ONCE.

cd ./containers && docker-compose up -d 

Get Ent codegen tool (only do this once)

make cli

Generate Entities

make gen

Build the app

make build

Run the app

make run

Making HTTP/REST requests

Assuming the app is running on localhost try adding a song by making the following curl request

curl --request POST \
  --url http://localhost:42069/api/v1/song/add \
  --header 'Content-Type: application/json' \
  --data '{
	"name": "test",
	"fileUrl": "http://file.com/123.mp3"
}'
Owner
Arthur Kennedy Otieno
Arthur Kennedy Otieno
Query, update and convert data structures from the command line. Comparable to jq/yq but supports JSON, TOML, YAML, XML and CSV with zero runtime dependencies.

dasel Dasel (short for data-selector) allows you to query and modify data structures using selector strings. Comparable to jq / yq, but supports JSON,

Tom Wright 1.8k Jan 17, 2022
An implementation of GraphQL for Go / Golang

graphql An implementation of GraphQL in Go. Follows the official reference implementation graphql-js. Supports: queries, mutations & subscriptions. Do

null 8.2k Jan 15, 2022
JSON query expression library in Golang.

jsonql JSON query expression library in Golang. This library enables query against JSON. Currently supported operators are: (precedences from low to h

Qian Chen 248 Nov 28, 2021
Convert Golang Struct To GraphQL Object On The Fly

Straf Convert Golang Struct To GraphQL Object On The Fly Easily Create GraphQL Schemas Example Converting struct to GraphQL Object type UserExtra stru

Roshan Mehta 32 Oct 27, 2021
Tools to write high performance GraphQL applications using Go/Golang.

graphql-go-tools Sponsors WunderGraph Are you looking for a GraphQL e2e data fetching solution? Supports frameworks like NextJS, type safety with gene

Jens Neuse 265 Jan 23, 2022
GSQL is a structured query language code builder for golang.

GSQL is a structured query language code builder for golang.

Leon Ding 105 Dec 15, 2021
Go monolith with embedded microservices including GRPC,REST,GraphQL and The Clean Architecture.

GoArcc - Go monolith with embedded microservices including GRPC,REST, graphQL and The Clean Architecture. Description When you start writing a Go proj

Deqode 76 Jan 13, 2022
A simple Go, GraphQL, and PostgreSQL starter template

Simple Go/GraphQL/PostgreSQL template Purpose Have a good starting point for any project that needs a graphql, go, and postgres backend. It's a very l

Chris 0 Jan 8, 2022
Entitas-Go is a fast Entity Component System Framework (ECS) Go 1.17 port of Entitas v1.13.0 for C# and Unity.

Entitas-Go Entitas-GO is a fast Entity Component System Framework (ECS) Go 1.17 port of Entitas v1.13.0 for C# and Unity. Code Generator Install the l

Vladislav Fedotov 10 Jan 12, 2022
An entity framework for Go

ent - An Entity Framework For Go Simple, yet powerful entity framework for Go, that makes it easy to build and maintain applications with large data-m

Facebook 9.6k Jan 15, 2022
An entity framework for Go

ent - An Entity Framework For Go English | 中文 Simple, yet powerful entity framework for Go, that makes it easy to build and maintain applications with

Ent Foundation 9.7k Jan 22, 2022
An entity framework for Go

ent - An Entity Framework For Go English | 中文 Simple, yet powerful entity framework for Go, that makes it easy to build and maintain applications with

Ent Foundation 9.6k Jan 16, 2022
REST api using fiber framework written in golang and using firebase ecosystem to authentication, storage and firestore as a db and use clean architecture as base

Backend API Example FiberGo Framework Docs : https://github.com/gofiber Info This application using firebase ecosystem Firebase Auth Cloud Storage Fir

Atilla Pehlivan 0 Jan 11, 2022
🛠 A test fixtures replacement for Go, support struct and ent, inspired by factory_bot/factory_boy

carrier - A Test Fixtures Replacement for Go Statically Typed - 100% statically typed using code generation Developer Friendly API - explicit API with

null 5 Dec 14, 2021
Combine ent and gRPC, using Postgres as DBMS

database-system Combine ent and gRPC, using Postgres as DBMS How to develop Install tools brew install protobuf go mod tidy go install google.golang

null 0 Jan 9, 2022
Golang based User creation and Management application. GORM, Fiber, JWT

User Creation and Management app (BACK-END) Auth Features: Create Clients (regular password + 6 one-time passwords + (optional) QR code and Secret for

Artūras 1 Nov 30, 2021
A CLI for generating ER diagrams for Ent schema

enter A CLI for generating ER (entity-relationship) diagrams for Ent schema using mermaid.js.

Ariel Mashraki 77 Nov 18, 2021
Ent adapter for Casbin

Ent-Adapter Ent Adapter is the ent adapter for Casbin. With this library, Casbin can load policy from PostgresSQL/Mysql or save policy to it. Installa

Casbin 16 Jan 10, 2022
sql 语句转成 ent schema

sql2ent 该项目提供 sql 语句转化为 entgo schema 代码的命令行工具, 以提高工作效率。 前往学习entgo 功能 已完成 使用命令行批量转化 支持 mysql 计划 支持更多的数据库,例如:MariaDB、SQLite、PostgreSQL。 读取数据库,批量生成 schem

null 10 Dec 23, 2021
entviz is an ent extension that provides visualization of the schema graph

entviz entviz is an ent extension that creates visual graph (html file) of your ent's schema. install go get github.com/hedwigz/entviz add this exten

Amit Shani 48 Jan 14, 2022
entimport is a tool for creating Ent schemas from existing SQL databases.

entimport entimport is a tool for creating Ent schemas from existing SQL databases. Currently, MySQL and PostgreSQL are supported. The tool can import

ariga 42 Jan 13, 2022
entcache - An experimental cache driver for ent with variety of storage options

entcache An experimental cache driver for ent with variety of storage options, such as: A context.Context-based cache. Usually, attached to an HTTP re

ariga 62 Jan 16, 2022
sqlcomment is an ent driver that adds SQL comments following sqlcommenter specification.

sqlcomment sqlcomment is an ent driver that adds SQL comments following sqlcommenter specification. sqlcomment includes support for OpenTelemetry and

ariga 35 Jan 10, 2022
A Golang library for text processing, including tokenization, part-of-speech tagging, and named-entity extraction.

prose is a natural language processing library (English only, at the moment) in pure Go. It supports tokenization, segmentation, part-of-speech tagging, and named-entity extraction.

Joseph Kato 2.9k Jan 15, 2022
:book: A Golang library for text processing, including tokenization, part-of-speech tagging, and named-entity extraction.

prose prose is a natural language processing library (English only, at the moment) in pure Go. It supports tokenization, segmentation, part-of-speech

Joseph Kato 2.9k Jan 16, 2022
Fast Entity Component System in Golang

ECS Fast Entity Component System in Golang This module is the ECS part of the game engine i'm writing in Go. Features: as fast as packages with automa

Mario Olofo 1 Jan 20, 2022
Flagr is an open source Go service that delivers the right experience to the right entity and monitors the impact.

Flagr is an open source Go service that delivers the right experience to the right entity and monitors the impact. It provides feature flags, experimentation (A/B testing), and dynamic configuration. It has clear swagger REST APIs for flags management and flag evaluation.

null 21 Dec 28, 2021
A simple GO module providing CRUD and match methods on a User "entity" stored locally as JSON

A simple GO module providing CRUD and match methods on a User "entity" stored locally as JSON. Created for GO language learning purposes. Once finishe

Lorenzo Piersante 0 Jan 1, 2022
📁 Examples for 🚀 Fiber - Express inspired web framework written in Go

?? Examples for ?? Fiber - Express inspired web framework written in Go

Fiber 1.2k Jan 15, 2022