How to Structure a Golang REST API

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ค. 2024
  • This extensive course will teach you the fundamental methods and best practices for organising a Golang REST API to guarantee scalability and maintainability. We will walk you through the steps of creating a neat and effective project architecture, putting reusable and modular code into practice, and making the most of the Gin framework.
    This course will provide you the skills and knowledge you need to build reliable and scalable RESTful APIs in Go, regardless of your level of expertise as a developer. You can use it to construct your first API or enhance your knowledge. Come learn from the pros at organising Golang REST APIs and advance your programming abilities!
    Content Timestamp
    0:00 Setting up your Rest API server with Gin
    1:43 Project structure to for maintainability
    3:09 How to Use Gin in creating a server
    24:43 Adding env to your Golang project structure
    38:23 How to Use GORM, an ORM library for Golang
    1:00:48 Setting up auto-migration with GORM.
    1:07:49 Creating a user repository to utilise GORM Queries
    1:32:10 Creating a handler for POST and GET endpoints
    1:47:29 Registering routes with Gin Server
    2:04:35 Testing endpoints with POSTMAN
    Project Source Code: github.com/withsilasogar/rest...

ความคิดเห็น • 19

  • @EstherOgar-fr1lp
    @EstherOgar-fr1lp หลายเดือนก่อน +3

    Great job

  • @Llewxam619
    @Llewxam619 หลายเดือนก่อน +3

    Very interesting

  • @AnneNwagbaraocha
    @AnneNwagbaraocha หลายเดือนก่อน +2

    Very educational

  • @WellnessWaves953
    @WellnessWaves953 หลายเดือนก่อน +2

    What an incredibly informative video! Good Job 👍

  • @gloryokoi8791
    @gloryokoi8791 หลายเดือนก่อน +1

    Very informative 🙏 Thank you

  • @festusishioma5096
    @festusishioma5096 หลายเดือนก่อน

    This video just uplifted my status as a golang developer. Thanks Silas Ogar

  • @MelodyUshang
    @MelodyUshang หลายเดือนก่อน +1

    Great job👍

  • @henry_comic
    @henry_comic หลายเดือนก่อน

    Nice

  • @techwithdenis
    @techwithdenis หลายเดือนก่อน +1

    I have been looking for an indept tutorial like this. Thank you very much.
    Can I make a request ?

    • @TechEducationWithSilasOgar
      @TechEducationWithSilasOgar  หลายเดือนก่อน +1

      Glad to know it was of help, feel free to make your request

    • @techwithdenis
      @techwithdenis หลายเดือนก่อน

      @@TechEducationWithSilasOgar Can you please create a tutorial on how to use GRPC in GoLang

    • @TechEducationWithSilasOgar
      @TechEducationWithSilasOgar  หลายเดือนก่อน +1

      @@techwithdenis Sure, will look into it

    • @ChristopherAkwagiobe
      @ChristopherAkwagiobe หลายเดือนก่อน

      @@TechEducationWithSilasOgarsorry sir please can I chat with you on WhatsApp

  • @user-zx3vp8mw7d
    @user-zx3vp8mw7d หลายเดือนก่อน +1

    Good one but too much using frameworks and libraries should be avoided.

  • @festusishioma5096
    @festusishioma5096 หลายเดือนก่อน +1

    If anyone encounter the "404 page not found" error after completing the video, try checking your server.go file and under the function you created for group routes replace all the case excecution from gs.engine.GET(path, handler) to group.GET(route.Path, route.Handler). I think the video did not cover the part where he debugged that issue

    • @TechEducationWithSilasOgar
      @TechEducationWithSilasOgar  29 วันที่ผ่านมา

      Thanks for the keen observation, it was captured right after the second to the last timeline. (1:54:47)

    • @festusishioma5096
      @festusishioma5096 28 วันที่ผ่านมา

      @@TechEducationWithSilasOgar ooh that's true, I was the one that wasn't observant there. My bad network made me watch it on 480p