Creating an API using Go and sqlc

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Squirrel

    Fluent SQL generation for golang

  • use some lib that facilitates SQL generation, like Squirrel

  • post-sqlc

    Code used in a post about sqlc.dev

  • db.go - contains the interfaces, structs, and constructors

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • go-sqlmock

    Sql mock driver for golang to test database interactions

  • For that, I used the lib go-sqlmock. So, for example, the following snippet is part of the person/service_test.go file:

  • sqlc

    Generate type-safe code from SQL

  • I will present in this post a project that fits in the last category: sqlc.

  • sqlx

    general purpose extensions to golang's database/sql

  • Implement the Repository interface by writing the queries in code, perhaps using some solution like Squirrel or sqlx.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts