Help us shape the future of Go! Take the 2026 Go Developer Survey

the_go_blog

command module
v0.0.0-...-edf7997 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 7 Imported by: 0

README

the_go_blog

Learning GO by building a CRUD restful API with gin. gorm and postgresql

we are also going to learn how to

  • build models in go
  • connect to the running SQL server
  • run db migrations with GORM

What is GORM ?

  • GORM is an object-relational mapper (ORM) library for Golang, buit on top of the golang database/sql package.
  • It only works with relational Databases (PostrgreSQL, SQLite, MySQL)
  • we will use this to create db models
  • Provides a way to manage conn b2n Go structs and corresponding SQL reps in the DB
  • GORM model is a struct with basic golang types, pointers and custom types implementing Scanner and Valuer.
  • Use PascalCase syntax for model and column name and use snake_case for columns.
  • Stuct tags are optional
  • Gorm allows you to use the native DB types in the gorm:"" tag annotation.

What is Gin Gonic ?

  • Gin Gonic is a high-perfomant web framework written in go.
  • Same class with the likes of express

INSTRUCTIONS

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL