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 welcome_test | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "errors" | |
| "github.com/gin-gonic/gin" | |
| "github.com/stretchr/testify/assert" | |
| "mail-sending/handlers/welcome" | |
| "mail-sending/helpers" |
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 main | |
| import ( | |
| "context" | |
| "fmt" | |
| "github.com/gin-gonic/gin" | |
| "github.com/joho/godotenv" | |
| "log" | |
| "mail-sending/emails/welcome_mail" | |
| "mail-sending/handlers/welcome" |
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
| APP_PORT=8080 | |
| GMAIL_USERNAME=your-gmail | |
| GMAIL_PASSWORD=your-gmail-password | |
| GMAIL_SERVER=smtp.gmail.com | |
| GMAIL_PORT=587 | |
| SENDGRID_API_KEY=your-sendgrid-api-key | |
| SENDGRID_FROM=your-sendgrid-email |
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 welcome | |
| import ( | |
| "github.com/gin-gonic/gin" | |
| "mail-sending/emails/welcome_mail" | |
| "mail-sending/helpers" | |
| "net/http" | |
| ) | |
| type service struct { |
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 welcome_mail | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "github.com/sendgrid/sendgrid-go" | |
| "github.com/sendgrid/sendgrid-go/helpers/mail" | |
| "html/template" | |
| "mail-sending/helpers" | |
| "net/smtp" |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>{{.Subject}}</title> | |
| <style type="text/css"> | |
| html { |
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 models | |
| import ( | |
| "errors" | |
| "html" | |
| "log" | |
| "os" | |
| "strings" | |
| "time" |
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
| init: | |
| go run github.com/99designs/gqlgen init | |
| generate: | |
| go run github.com/99designs/gqlgen && go run ./app/models/model_tags/model_tags.go | |
| run: | |
| go run main.go | |
| test: |
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
| # Where are all the schema files located? globs are supported eg src/**/*.graphqls | |
| schema: | |
| - app/schemas/*.graphql | |
| # Where should the generated server code go? | |
| exec: | |
| filename: app/generated/generated.go | |
| package: generated | |
| # Uncomment to enable federation |
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
| DATABASE_DRIVER=postgres | |
| DATABASE_USER=postgres | |
| DATABASE_NAME=multi-choice | |
| DATABASE_HOST=localhost | |
| DATABASE_PORT=5432 | |
| DATABASE_PASSWORD=password | |
| TEST_DB_DRIVER=postgres | |
| TEST_DB_HOST=127.0.0.1 |
NewerOlder