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 3.6k Aug 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.7k Aug 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 253 Aug 11, 2022
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 Jun 23, 2022
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 373 Aug 15, 2022
GSQL is a structured query language code builder for golang.

GSQL is a structured query language code builder for golang.

Leon Ding 107 Jun 5, 2022
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 79 Jul 20, 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
Fast :zap: reverse proxy in front of any GraphQL server for caching, securing and monitoring.

Fast ⚡ reverse proxy in front of any GraphQL server for caching, securing and monitoring. Features ?? Caching RFC7234 compliant HTTP Cache. Cache quer

GBox Proxy 18 Aug 2, 2022
This is a sample application of golang's web framework gin and orm ent.

Gin Ent Sample This is a sample application of golang's web framework gin and orm ent. Components Web Framework: Gin ORM: ent SQL Migration tool: goos

Takumi Ikeda 0 Dec 5, 2021
It took me a while to figure out how I can use GraphQL with the ent ORM and serve the GraphQL endpoint via the Echo framework

Go + Graphql + Ent + Echo Boilerplate It took me a while to figure out how I can use GraphQL with the ent ORM and serve the GraphQL endpoint via the E

Marc Boeker 1 Feb 12, 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 19 Jun 15, 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 11.4k Aug 9, 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 11.4k Aug 11, 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 11.4k Aug 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 6 Jan 23, 2022
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
Enthstore - Hstore type and predicates for Ent

Hstore type and predicates for Ent. This package defines the Postgres hstore typ

Pedro Henrique 1 Feb 3, 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 3 May 31, 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 Aug 18, 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 Aug 7, 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 5 May 11, 2022
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 92 Aug 4, 2022
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 31 Jul 30, 2022
sql 语句转成 ent schema

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

null 18 Jul 26, 2022
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 76 Aug 17, 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 90 Aug 8, 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 97 Aug 5, 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 51 Aug 12, 2022