Skip to content

Commit

Permalink
fixed imports path
Browse files Browse the repository at this point in the history
  • Loading branch information
aldor007 committed Nov 19, 2017
1 parent 6135458 commit 3d52a16
Show file tree
Hide file tree
Showing 19 changed files with 93 additions and 102 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ First step is to fork it at http://help.github.com/fork-a-repo/ and create your

Running the tests is as easy as:

make test
make tests

You should see the results of running your tests after an instant.

6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
WORKDIR $GOPATH
RUN curl -fsSL -o /usr/local/bin/dep https://github.com/golang/dep/releases/download/$DEP_VERSION/dep-linux-amd64 && chmod +x /usr/local/bin/dep
ADD . /go/src/mort
ADD . /go/src/github.com/aldor007/mort

RUN cd /go/src/mort && dep ensure -vendor-only
RUN cd /go/src/github.com/aldor007/mort && dep ensure -vendor-only
# RUN build
RUN cd /go/src/mort; go build cmd/mort.go; cp mort /go/mort; cp -r /go/src/mort/configuration /go/
RUN cd /go/src/github.com/aldor007/mort; go build cmd/mort.go; cp mort /go/mort; cp -r /go/src/github.com/aldor007/mort/configuration /go/
# clean up
RUN rm -rf /go/src; rm -rf /go/pkg; rm -rf /usr/share/; rm -rf /usr/include/

Expand Down
4 changes: 4 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,7 @@
[[constraint]]
name = "github.com/spaolacci/murmur3"
branch = "master"

[[constraint]]
name = "github.com/aldor007/go-aws-auth"
branch = "master"
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ S3 compatible image processing server written in Go.
* Convert (JPEG, , PNG , BMP, TIFF, ...)
* Multiple storage backends (disk, S3, http)
* Fully modular
* S3 API for listing and uploading files
* S3 API for listing and uploading files
* Request collapsing
* Build in rate limiter

# Demo
-------
Expand All @@ -32,7 +34,7 @@ S3 compatible image processing server written in Go.
</td>
<td>
<a href="https://mort.mkaciuba.com/demo/small/cat.jpg" target="_blank">
<img src="https://mort.mkaciuba.com/demo/small/cat.jpg">
![small](https://mort.mkaciuba.com/demo/small/cat.jpg)
</a>
</td>
</tr>
Expand All @@ -47,7 +49,7 @@ S3 compatible image processing server written in Go.
</td>
<td>
<a href="https://mort.mkaciuba.com/demo/blur/cat.jpg" target="_blank">
<img src="https://mort.mkaciuba.com/demo/blur/cat.jpg">
![blur](https://mort.mkaciuba.com/demo/blur/cat.jpg")
</a>
</td>
</tr>
Expand All @@ -62,7 +64,7 @@ S3 compatible image processing server written in Go.
</td>
<td>
<a href="https://mort.mkaciuba.com/demo/webp/cat.jpg" target="_blank">
<img src="https://mort.mkaciuba.com/demo/webp/cat.jpg">
![webp](https://mort.mkaciuba.com/demo/webp/cat.jpg)
</a>
</td>
</tr>
Expand All @@ -77,7 +79,7 @@ S3 compatible image processing server written in Go.
</td>
<td>
<a href="https://mort.mkaciuba.com/watermark/webp/cat.jpg" target="_blank">
<img src="https://mort.mkaciuba.com/watermark/webp/cat.jpg">
![watermark](https://mort.mkaciuba.com/watermark/cat.jpg)
</a>
</td>
</tr>
Expand All @@ -88,6 +90,13 @@ S3 compatible image processing server written in Go.

Mort can be used direct from Internet and behind any proxy.

## Install

```bash
go get github.com/aldor007/mort/cmd/mort.go
```


## Command line help
```bash
$ ./mort
Expand All @@ -109,7 +118,7 @@ headers: # overwritten all response headers of given status. This field is optio

buckets: # list of available buckets
demo: # bucket name
keys: # list of S3 keys (optiona
keys: # list of S3 keys (optional)
- accessKey: "access"
secretAccessKey: "random"
transform: # config for transforms
Expand Down Expand Up @@ -156,7 +165,7 @@ buckets: # list of available buckets

## Debian and Ubuntu

We will provide Debian package when we will be completely stable ;)
I will provide Debian package when we will be completely stable ;)

## Docker
Pull docker image
Expand Down
20 changes: 10 additions & 10 deletions cmd/mort.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import (
"github.com/go-chi/chi"
"go.uber.org/zap"

"mort"
"mort/config"
"mort/lock"
"mort/log"
mortMiddleware "mort/middleware"
"mort/object"
"mort/response"
"mort/throttler"
"github.com/aldor007/mort"
"github.com/aldor007/mort/config"
"github.com/aldor007/mort/lock"
"github.com/aldor007/mort/log"
mortMiddleware "github.com/aldor007/mort/middleware"
"github.com/aldor007/mort/object"
"github.com/aldor007/mort/response"
"github.com/aldor007/mort/throttler"
)

const (
Expand Down Expand Up @@ -70,7 +70,7 @@ func main() {
res.Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, HEAD")
defer logger.Sync() // flushes buffer, if any
if res.HasError() {
log.Log().Warn("Mort process error", zap.String("obj.Key", obj.Key), zap.Error(res.Error()))
log.Log().Warn("github.com/aldor007/mort process error", zap.String("obj.Key", obj.Key), zap.Error(res.Error()))
}

res.Send(resWriter)
Expand All @@ -79,7 +79,7 @@ func main() {

router.HandleFunc("/", http.HandlerFunc(func(resWriter http.ResponseWriter, req *http.Request) {
resWriter.WriteHeader(400)
log.Log().Warn("Mort error request shouldn't go here")
log.Log().Warn("github.com/aldor007/mort error request shouldn't go here")
}))

s := &http.Server{
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"sync"

"mort/log"
"github.com/aldor007/mort/log"
)

// Config contains configuration for buckets etc
Expand Down
8 changes: 4 additions & 4 deletions engine/image_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"go.uber.org/zap"
"gopkg.in/h2non/bimg.v1"

"mort/log"
"mort/object"
"mort/response"
"mort/transforms"
"github.com/aldor007/mort/log"
"github.com/aldor007/mort/object"
"github.com/aldor007/mort/response"
"github.com/aldor007/mort/transforms"
"runtime"
)

Expand Down
2 changes: 1 addition & 1 deletion lock/lock.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package lock

import (
"mort/response"
"github.com/aldor007/mort/response"
)

// Lock is responding for collapsing request for same object
Expand Down
2 changes: 1 addition & 1 deletion lock/memory.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package lock

import (
"mort/response"
"github.com/aldor007/mort/response"
"sync"
)

Expand Down
2 changes: 1 addition & 1 deletion lock/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package lock
import (
"errors"
"github.com/stretchr/testify/assert"
"mort/response"
"github.com/aldor007/mort/response"
"testing"
"time"
)
Expand Down
4 changes: 2 additions & 2 deletions middleware/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"time"

"mort/config"
"mort/response"
"github.com/aldor007/mort/config"
"github.com/aldor007/mort/response"

"github.com/aldor007/go-aws-auth"
)
Expand Down
6 changes: 3 additions & 3 deletions object/file_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"strings"

"go.uber.org/zap"
"mort/config"
"mort/log"
"mort/transforms"
"github.com/aldor007/mort/config"
"github.com/aldor007/mort/log"
"github.com/aldor007/mort/transforms"
"strconv"
)

Expand Down
4 changes: 2 additions & 2 deletions object/file_object_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/stretchr/testify/assert"

"mort/config"
"mort/transforms"
"github.com/aldor007/mort/config"
"github.com/aldor007/mort/transforms"
)

var imageInfo = transforms.ImageInfo{}
Expand Down
Loading

0 comments on commit 3d52a16

Please sign in to comment.