This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package entity | |
| import "gorm.io/gorm" | |
| type Example struct { | |
| gorm.Model | |
| Name string | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package postgre | |
| import ( | |
| "fmt" | |
| "go.uber.org/zap" | |
| "gorm.io/driver/postgres" | |
| "gorm.io/gorm" | |
| "gorm.io/gorm/schema" | |
| "helloWorld/pkg/config/config" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package migrate | |
| import ( | |
| "github.com/golang-migrate/migrate/v4" | |
| _ "github.com/golang-migrate/migrate/v4/database/postgres" | |
| _ "github.com/golang-migrate/migrate/v4/source/file" | |
| "go.uber.org/zap" | |
| "helloWorld/pkg/config/config" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.2' | |
| networks: | |
| kafka-cluster: | |
| driver: bridge | |
| services: | |
| postgres: | |
| image: postgres:12-alpine | |
| environment: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package logging | |
| import ( | |
| "bytes" | |
| "github.com/Shopify/sarama" | |
| "go.uber.org/zap" | |
| "log" | |
| "net/url" | |
| "strconv" | |
| "strings" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.2' | |
| services: | |
| elasticsearch: | |
| image: docker.elastic.co/elasticsearch/elasticsearch:7.8.0 | |
| volumes: | |
| - type: bind | |
| source: ../config/elasticsearch.yml | |
| target: /usr/share/elasticsearch/config/elasticsearch.yml | |
| read_only: true | |
| - type: volume |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package logging | |
| import ( | |
| "fmt" | |
| "go.uber.org/zap" | |
| "helloWorld/pkg/config/config" | |
| "net/url" | |
| "os" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package config | |
| import ( | |
| "fmt" | |
| "github.com/spf13/viper" | |
| "helloWorld/pkg/util" | |
| ) | |
| const ( | |
| defaultConfigPath = "config" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package config | |
| import ( | |
| "fmt" | |
| "github.com/spf13/viper" | |
| ) | |
| var readFromLocalAppYml = func(v *viper.Viper) *viper.Viper { | |
| fmt.Println("Reading application yml configuration") | |
| v.SetConfigName(defaultConfigFileName) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package config | |
| import ( | |
| "bytes" | |
| "encoding/base64" | |
| "fmt" | |
| "github.com/spf13/viper" | |
| "github.com/valyala/fasthttp" | |
| "os" | |
| ) |