Skip to content

Commit

Permalink
refactor to support urls up to 2048 characters and add better error h…
Browse files Browse the repository at this point in the history
…andling
  • Loading branch information
alexferl committed Nov 16, 2018
1 parent 7b523e2 commit 3db9cc2
Show file tree
Hide file tree
Showing 16 changed files with 273 additions and 293 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ _testmain.go
*.exe
*.test
*.prof
/brevis
brevis
/vendor/
.idea
22 changes: 15 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
FROM golang:alpine
FROM golang:1.11.2-alpine as builder
MAINTAINER Alexandre Ferland <aferlandqc@gmail.com>

ENV GO111MODULE=on

WORKDIR /build

RUN apk add --no-cache git

ADD . /go/src/github.com/admiralobvious/brevis
WORKDIR /go/src/github.com/admiralobvious/brevis
COPY go.mod .
COPY go.sum .

RUN go-wrapper download
RUN go-wrapper install
RUN go mod download

EXPOSE 1323
COPY . .

CMD ["/go/bin/brevis", "--address", "0.0.0.0"]
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build

FROM scratch
COPY --from=builder /build/brevis /brevis
EXPOSE 1323
ENTRYPOINT ["/brevis", "--address", "0.0.0.0"]
165 changes: 0 additions & 165 deletions Gopkg.lock

This file was deleted.

54 changes: 0 additions & 54 deletions Gopkg.toml

This file was deleted.

3 changes: 2 additions & 1 deletion backend/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"github.com/admiralobvious/brevis/model"
)

// Backend a common interface for all backend
// Backend a common interface for all backends
type Backend interface {
Init() error
Get(*model.UrlMapping) (*model.UrlMapping, error)
Set(*model.UrlMapping) error
Update(*model.UrlMapping) error
}
Loading

0 comments on commit 3db9cc2

Please sign in to comment.