Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ jobs:
binary_name: ${{ matrix.target }}
extra_files: LICENSE README.md
release_tag: ${{ steps.tagref.outputs.tag }}
ldflags: -X github.com/JackyXinHao/http2smtp/internal/api.Version=${{ steps.tagref.outputs.tag }}+${{ github.sha }}
ldflags: -X github.com/jackyxinhao/http2smtp/internal/api.Version=${{ steps.tagref.outputs.tag }}+${{ github.sha }}
executable_compression: upx
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
.env
coverage.txt
http2smtp
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ ARG version
ARG goos=linux
ARG goarch=amd64
LABEL version=${version}
WORKDIR /go/src/github.com/JackyXinHao/http2smtp
WORKDIR /go/src/github.com/jackyxinhao/http2smtp
COPY . .
# Inject the build version: https://blog.alexellis.io/inject-build-time-vars-golang/
RUN CGO_ENABLED=0 GOOS=${goos} GOARCH=${goarch} go build \
-ldflags "-X github.com/JackyXinHao/http2smtp/internal/api.Version=${version}" \
-ldflags "-X github.com/jackyxinhao/http2smtp/internal/api.Version=${version}" \
-o /http2smtp \
./cmd/http2smtp
RUN upx /http2smtp
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 📩 HTTP to SMTP
[![ci](https://github.com/JackyXinHao/http2smtp/workflows/build/badge.svg)](https://github.com/JackyXinHao/http2smtp/actions) [![codecov](https://codecov.io/gh/JackyXinHao/http2smtp/branch/master/graph/badge.svg?token=XH18EYLDLZ)](https://codecov.io/gh/JackyXinHao/http2smtp) [![version](https://img.shields.io/github/v/tag/JackyXinHao/http2smtp?label=version&logo=github&sort=semver)](https://github.com/JackyXinHao/http2smtp/releases) [![license](https://img.shields.io/github/license/JackyXinHao/http2smtp)](https://github.com/JackyXinHao/http2smtp/blob/master/LICENSE)
[![ci](https://github.com/jackyxinhao/http2smtp/workflows/build/badge.svg)](https://github.com/jackyxinhao/http2smtp/actions) [![codecov](https://codecov.io/gh/jackyxinhao/http2smtp/branch/master/graph/badge.svg?token=ZGGDRBTW9U)](https://codecov.io/gh/jackyxinhao/http2smtp) [![version](https://img.shields.io/github/v/tag/jackyxinhao/http2smtp?label=version&logo=github&sort=semver)](https://github.com/jackyxinhao/http2smtp/releases) [![license](https://img.shields.io/github/license/jackyxinhao/http2smtp)](https://github.com/jackyxinhao/http2smtp/blob/master/LICENSE)

An API that forwards HTTP-backed vendor mailer calls to SMTP.

Expand All @@ -17,7 +17,7 @@ See [examples](examples).

:zap: ProTip: for tracing purposes, this app kinda supports [W3C Trace Context recommendation](https://www.w3.org/TR/trace-context/). Configure the env var `TRACEPARENT_HEADER` and inject any trace into this header value. All log entries will be contextualized with the given value.

### Docker image [![docker pull](https://img.shields.io/docker/pulls/JackyXinHao/http2smtp)](https://hub.docker.com/repository/docker/JackyXinHao/http2smtp) [![size](https://img.shields.io/docker/image-size/JackyXinHao/http2smtp?sort=semver)](https://hub.docker.com/repository/docker/JackyXinHao/http2smtp)
### Docker image [![docker pull](https://img.shields.io/docker/pulls/jackyxin/http2smtp)](https://hub.docker.com/repository/docker/jackyxin/http2smtp) [![size](https://img.shields.io/docker/image-size/jackyxin/http2smtp?sort=semver)](https://hub.docker.com/repository/docker/jackyxin/http2smtp)

1. Checkout this repo or only copy the `.env.dist` and `docker-compose.yml` files
1. Rename `.env.dist` into `.env`
Expand All @@ -44,4 +44,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file

## Contributors

[![contributors](https://contrib.rocks/image?repo=JackyXinHao/http2smtp)](https://github.com/JackyXinHao/http2smtp/graphs/contributors)
[![contributors](https://contrib.rocks/image?repo=jackyxinhao/http2smtp)](https://github.com/jackyxinhao/http2smtp/graphs/contributors)
2 changes: 1 addition & 1 deletion cmd/http2smtp-lambda/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
URL=https://api.github.com/repos/JackyXinHao/http2smtp/releases/latest
URL=https://api.github.com/repos/jackyxinhao/http2smtp/releases/latest

.DEFAULT: usage

Expand Down
2 changes: 1 addition & 1 deletion cmd/http2smtp-lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $ make
If you wish to download a specific version of http2smtp, you can prefix the download URL as env var prior calling `make download`:

```bash
$ URL=https://api.github.com/repos/JackyXinHao/http2smtp/releases/tags/v1.2.3 make download
$ URL=https://api.github.com/repos/jackyxinhao/http2smtp/releases/tags/v1.2.3 make download
```

Then deploy using `make deploy`.
8 changes: 4 additions & 4 deletions cmd/http2smtp-lambda/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"os"
"time"

"github.com/JackyXinHao/http2smtp/internal/api"
"github.com/JackyXinHao/http2smtp/internal/converter"
"github.com/JackyXinHao/http2smtp/internal/env"
"github.com/JackyXinHao/http2smtp/internal/smtp"
"github.com/aws/aws-lambda-go/lambda"
"github.com/awslabs/aws-lambda-go-api-proxy/httpadapter"
"github.com/jackyxinhao/http2smtp/internal/api"
"github.com/jackyxinhao/http2smtp/internal/converter"
"github.com/jackyxinhao/http2smtp/internal/env"
"github.com/jackyxinhao/http2smtp/internal/smtp"
"github.com/kelseyhightower/envconfig"
"github.com/rs/zerolog"
)
Expand Down
8 changes: 4 additions & 4 deletions cmd/http2smtp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"os"
"time"

"github.com/JackyXinHao/http2smtp/internal/api"
"github.com/JackyXinHao/http2smtp/internal/converter"
"github.com/JackyXinHao/http2smtp/internal/env"
"github.com/JackyXinHao/http2smtp/internal/smtp"
"github.com/jackyxinhao/http2smtp/internal/api"
"github.com/jackyxinhao/http2smtp/internal/converter"
"github.com/jackyxinhao/http2smtp/internal/env"
"github.com/jackyxinhao/http2smtp/internal/smtp"
"github.com/kelseyhightower/envconfig"
"github.com/rs/zerolog"
)
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
http2smtp:
image: JackyXinHao/http2smtp
image: jackyxin/http2smtp
build:
context: .
args:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/JackyXinHao/http2smtp
module github.com/jackyxinhao/http2smtp

go 1.16

Expand Down
4 changes: 2 additions & 2 deletions internal/api/handler/sparkpost.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net/http"
"strconv"

"github.com/JackyXinHao/http2smtp/internal/converter"
"github.com/JackyXinHao/http2smtp/internal/smtp"
"github.com/jackyxinhao/http2smtp/internal/converter"
"github.com/jackyxinhao/http2smtp/internal/smtp"
)

const spIDLenght = 10000000000000000
Expand Down
4 changes: 2 additions & 2 deletions internal/api/handler/sparkpost_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"strings"
"testing"

"github.com/JackyXinHao/http2smtp/internal/converter"
"github.com/JackyXinHao/http2smtp/internal/smtp"
"github.com/jackyxinhao/http2smtp/internal/converter"
"github.com/jackyxinhao/http2smtp/internal/smtp"
)

func TestSparkPost(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/api/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http"
"time"

"github.com/JackyXinHao/http2smtp/internal/ctx"
"github.com/jackyxinhao/http2smtp/internal/ctx"
"github.com/justinas/alice"
"github.com/rs/zerolog"
"github.com/rs/zerolog/hlog"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"testing"
"time"

"github.com/JackyXinHao/http2smtp/internal/ctx"
"github.com/jackyxinhao/http2smtp/internal/ctx"
"github.com/rs/zerolog"
"github.com/rs/zerolog/hlog"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/api/mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package api
import (
"net/http"

"github.com/JackyXinHao/http2smtp/internal/api/handler"
"github.com/gorilla/mux"
"github.com/jackyxinhao/http2smtp/internal/api/handler"
)

// Mux returns the app routes
Expand Down
4 changes: 2 additions & 2 deletions internal/api/mux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"testing"
"time"

"github.com/JackyXinHao/http2smtp/internal/converter"
"github.com/JackyXinHao/http2smtp/internal/smtp"
"github.com/jackyxinhao/http2smtp/internal/converter"
"github.com/jackyxinhao/http2smtp/internal/smtp"
)

func TestAPI_Mux(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions internal/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"os/signal"
"time"

"github.com/JackyXinHao/http2smtp/internal/converter"
"github.com/JackyXinHao/http2smtp/internal/env"
"github.com/JackyXinHao/http2smtp/internal/smtp"
"github.com/jackyxinhao/http2smtp/internal/converter"
"github.com/jackyxinhao/http2smtp/internal/env"
"github.com/jackyxinhao/http2smtp/internal/smtp"
"github.com/rs/zerolog"
)

Expand Down
6 changes: 3 additions & 3 deletions internal/api/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"testing"
"time"

"github.com/JackyXinHao/http2smtp/internal/converter"
"github.com/JackyXinHao/http2smtp/internal/env"
"github.com/JackyXinHao/http2smtp/internal/smtp"
"github.com/jackyxinhao/http2smtp/internal/converter"
"github.com/jackyxinhao/http2smtp/internal/env"
"github.com/jackyxinhao/http2smtp/internal/smtp"
"github.com/rs/zerolog"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/smtp/smtp.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"io"
"net/smtp"

"github.com/JackyXinHao/http2smtp/internal/converter"
ictx "github.com/JackyXinHao/http2smtp/internal/ctx"
"github.com/jackyxinhao/http2smtp/internal/converter"
ictx "github.com/jackyxinhao/http2smtp/internal/ctx"
"github.com/rs/zerolog"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/smtp/smtp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"strings"
"testing"

"github.com/JackyXinHao/http2smtp/internal/converter"
"github.com/JackyXinHao/http2smtp/internal/ctx"
"github.com/jackyxinhao/http2smtp/internal/converter"
"github.com/jackyxinhao/http2smtp/internal/ctx"
"github.com/rs/zerolog"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/smtp/stub.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package smtp
import (
"context"

"github.com/JackyXinHao/http2smtp/internal/converter"
"github.com/jackyxinhao/http2smtp/internal/converter"
)

// Stub is a test struct that implements Client
Expand Down
2 changes: 1 addition & 1 deletion internal/smtp/stub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"
"testing"

"github.com/JackyXinHao/http2smtp/internal/converter"
"github.com/jackyxinhao/http2smtp/internal/converter"
)

func TestStub(t *testing.T) {
Expand Down