Sobes.tech
Middle+

Rate your knowledge of technologies: Go, PostgreSQL, Docker, Kubernetes, Kafka, RabbitMQ, GORM.

sobes.tech AI

Answer from AI

Go: Proficient in the language, experience in writing multithreaded applications using goroutines and channels, understanding of interfaces and design patterns.

PostgreSQL: Knowledge of basic data types, indexes, writing complex SQL queries, configuring replication, performance optimization.

Docker: Experience in creating and optimizing Dockerfiles, working with containers, understanding network settings and volumes.

Kubernetes: Knowledge of core objects (Pod, Deployment, Service), experience in deploying applications, configuring scaling and monitoring.

Kafka: Understanding of architecture, configuring producers and consumers, working with topics and partitions.

RabbitMQ: Experience in setting up queues, exchanges, understanding messaging models (direct, topic, fanout).

GORM: Using ORM for database operations in Go, writing migrations, optimizing queries with GORM.

Example of using GORM to create a record in PostgreSQL:

package main

import (
    "gorm.io/driver/postgres"
    "gorm.io/gorm"
)

type User struct {
    ID   uint
    Name string
}

func main() {
    dsn := "host=localhost user=gorm dbname=gorm password=gorm sslmode=disable"
    db, err := gorm.Open(postgres.Open(dsn), &gorm.Config{})
    if err != nil {
        panic("failed to connect database")
    }

    db.AutoMigrate(&User{})

    db.Create(&User{Name: "John"})
}