Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: enable base64 processing #2

Open
wants to merge 10 commits into
base: release
Choose a base branch
from
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
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ RUN DEBIAN_FRONTEND=noninteractive \
rm -rf /usr/local/lib/*.a && \
rm -rf /usr/local/lib/*.la

WORKDIR ${GOPATH}/src/github.com/cshum/imagor
WORKDIR ${GOPATH}/src/github.com/kumparan/imagor

COPY go.mod .
COPY go.sum .
Expand All @@ -47,6 +47,7 @@ RUN go mod download
COPY . .

RUN if [ "$TARGETARCH" = "amd64" ]; then go test ./...; fi
# RUN go test ./...
RUN go build -o ${GOPATH}/bin/imagor ./cmd/imagor/main.go

FROM debian:bookworm-slim
Expand Down
4 changes: 2 additions & 2 deletions blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package imagor
import (
"bytes"
"encoding/json"
"github.com/cshum/imagor/fanoutreader"
"github.com/cshum/imagor/seekstream"
"github.com/kumparan/imagor/fanoutreader"
"github.com/kumparan/imagor/seekstream"
"io"
"net/http"
"os"
Expand Down
8 changes: 4 additions & 4 deletions cmd/imagor/main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package main

import (
"github.com/cshum/imagor/config"
"github.com/cshum/imagor/config/awsconfig"
"github.com/cshum/imagor/config/gcloudconfig"
"github.com/cshum/imagor/config/vipsconfig"
"github.com/kumparan/imagor/config"
"github.com/kumparan/imagor/config/awsconfig"
"github.com/kumparan/imagor/config/gcloudconfig"
"github.com/kumparan/imagor/config/vipsconfig"
"os"
)

Expand Down
4 changes: 2 additions & 2 deletions config/awsconfig/awsconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/cshum/imagor"
"github.com/cshum/imagor/storage/s3storage"
"github.com/kumparan/imagor"
"github.com/kumparan/imagor/storage/s3storage"
"go.uber.org/zap"
)

Expand Down
6 changes: 3 additions & 3 deletions config/awsconfig/awsconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package awsconfig
import (
"testing"

"github.com/cshum/imagor"
"github.com/cshum/imagor/config"
"github.com/cshum/imagor/storage/s3storage"
"github.com/kumparan/imagor"
"github.com/kumparan/imagor/config"
"github.com/kumparan/imagor/storage/s3storage"
"github.com/stretchr/testify/assert"
)

Expand Down
8 changes: 4 additions & 4 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"strings"
"time"

"github.com/cshum/imagor/metrics/prometheusmetrics"
"github.com/kumparan/imagor/metrics/prometheusmetrics"

"github.com/cshum/imagor"
"github.com/cshum/imagor/imagorpath"
"github.com/cshum/imagor/server"
"github.com/kumparan/imagor"
"github.com/kumparan/imagor/imagorpath"
"github.com/kumparan/imagor/server"
"github.com/peterbourgon/ff/v3"
"go.uber.org/zap"
)
Expand Down
10 changes: 5 additions & 5 deletions config/config_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package config

import (
"github.com/cshum/imagor"
"github.com/cshum/imagor/imagorpath"
"github.com/cshum/imagor/loader/httploader"
"github.com/cshum/imagor/metrics/prometheusmetrics"
"github.com/cshum/imagor/storage/filestorage"
"github.com/kumparan/imagor"
"github.com/kumparan/imagor/imagorpath"
"github.com/kumparan/imagor/loader/httploader"
"github.com/kumparan/imagor/metrics/prometheusmetrics"
"github.com/kumparan/imagor/storage/filestorage"
"github.com/stretchr/testify/assert"
"net/http"
"testing"
Expand Down
4 changes: 2 additions & 2 deletions config/fileconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package config

import (
"flag"
"github.com/cshum/imagor"
"github.com/cshum/imagor/storage/filestorage"
"github.com/kumparan/imagor"
"github.com/kumparan/imagor/storage/filestorage"
"go.uber.org/zap"
)

Expand Down
4 changes: 2 additions & 2 deletions config/gcloudconfig/gcloudconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"cloud.google.com/go/storage"
"context"
"flag"
"github.com/cshum/imagor"
"github.com/cshum/imagor/storage/gcloudstorage"
"github.com/kumparan/imagor"
"github.com/kumparan/imagor/storage/gcloudstorage"
"go.uber.org/zap"
)

Expand Down
6 changes: 3 additions & 3 deletions config/gcloudconfig/gcloudconfig_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package gcloudconfig

import (
"github.com/cshum/imagor"
"github.com/cshum/imagor/config"
"github.com/cshum/imagor/storage/gcloudstorage"
"github.com/kumparan/imagor"
"github.com/kumparan/imagor/config"
"github.com/kumparan/imagor/storage/gcloudstorage"
"github.com/fsouza/fake-gcs-server/fakestorage"
"github.com/stretchr/testify/assert"
"os"
Expand Down
4 changes: 2 additions & 2 deletions config/httpconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"flag"
"net"

"github.com/cshum/imagor"
"github.com/cshum/imagor/loader/httploader"
"github.com/kumparan/imagor"
"github.com/kumparan/imagor/loader/httploader"
"go.uber.org/zap"
)

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

import (
"flag"
"github.com/cshum/imagor"
"github.com/kumparan/imagor"
"go.uber.org/zap"
)

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

import (
"flag"
"github.com/cshum/imagor"
"github.com/kumparan/imagor"
"github.com/stretchr/testify/assert"
"go.uber.org/zap"
"testing"
Expand Down
4 changes: 2 additions & 2 deletions config/vipsconfig/vipsconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package vipsconfig

import (
"flag"
"github.com/cshum/imagor"
"github.com/cshum/imagor/vips"
"github.com/kumparan/imagor"
"github.com/kumparan/imagor/vips"
"go.uber.org/zap"
)

Expand Down
6 changes: 3 additions & 3 deletions config/vipsconfig/vipsconfig_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package vipsconfig

import (
"github.com/cshum/imagor"
"github.com/cshum/imagor/config"
"github.com/cshum/imagor/vips"
"github.com/kumparan/imagor"
"github.com/kumparan/imagor/config"
"github.com/kumparan/imagor/vips"
"github.com/stretchr/testify/assert"
"testing"
)
Expand Down
4 changes: 3 additions & 1 deletion errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strconv"
"strings"

"github.com/cshum/imagor/imagorpath"
"github.com/kumparan/imagor/imagorpath"
)

var (
Expand Down Expand Up @@ -37,6 +37,8 @@ var (
ErrTooManyRequests = NewError("too many requests", http.StatusTooManyRequests)
// ErrInternal internal error
ErrInternal = NewError("internal error", http.StatusInternalServerError)
// ErrEmptyBody empty body
ErrEmptyBody = NewError("Empty or unreadable image", http.StatusBadRequest)
)

const errPrefix = "imagor:"
Expand Down
2 changes: 1 addition & 1 deletion errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package imagor
import (
"context"
"errors"
"github.com/cshum/imagor/imagorpath"
"github.com/kumparan/imagor/imagorpath"
"github.com/stretchr/testify/assert"
"net"
"net/http"
Expand Down
8 changes: 4 additions & 4 deletions examples/from_buffer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package main

import (
"context"
"github.com/cshum/imagor"
"github.com/cshum/imagor/imagorpath"
"github.com/cshum/imagor/loader/httploader"
"github.com/cshum/imagor/vips"
"github.com/kumparan/imagor"
"github.com/kumparan/imagor/imagorpath"
"github.com/kumparan/imagor/loader/httploader"
"github.com/kumparan/imagor/vips"
"io"
"net/http"
"os"
Expand Down
8 changes: 4 additions & 4 deletions examples/from_file/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package main

import (
"context"
"github.com/cshum/imagor"
"github.com/cshum/imagor/imagorpath"
"github.com/cshum/imagor/loader/httploader"
"github.com/cshum/imagor/vips"
"github.com/kumparan/imagor"
"github.com/kumparan/imagor/imagorpath"
"github.com/kumparan/imagor/loader/httploader"
"github.com/kumparan/imagor/vips"
"io"
"net/http"
"os"
Expand Down
8 changes: 4 additions & 4 deletions examples/from_memory/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package main

import (
"context"
"github.com/cshum/imagor"
"github.com/cshum/imagor/imagorpath"
"github.com/cshum/imagor/loader/httploader"
"github.com/cshum/imagor/vips"
"github.com/kumparan/imagor"
"github.com/kumparan/imagor/imagorpath"
"github.com/kumparan/imagor/loader/httploader"
"github.com/kumparan/imagor/vips"
"image"
"io"
"net/http"
Expand Down
8 changes: 4 additions & 4 deletions examples/from_path/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package main

import (
"context"
"github.com/cshum/imagor"
"github.com/cshum/imagor/imagorpath"
"github.com/cshum/imagor/loader/httploader"
"github.com/cshum/imagor/vips"
"github.com/kumparan/imagor"
"github.com/kumparan/imagor/imagorpath"
"github.com/kumparan/imagor/loader/httploader"
"github.com/kumparan/imagor/vips"
"io"
"os"
)
Expand Down
8 changes: 4 additions & 4 deletions examples/from_reader/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package main

import (
"context"
"github.com/cshum/imagor"
"github.com/cshum/imagor/imagorpath"
"github.com/cshum/imagor/loader/httploader"
"github.com/cshum/imagor/vips"
"github.com/kumparan/imagor"
"github.com/kumparan/imagor/imagorpath"
"github.com/kumparan/imagor/loader/httploader"
"github.com/kumparan/imagor/vips"
"io"
"net/http"
"os"
Expand Down
12 changes: 6 additions & 6 deletions examples/server/main.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package main

import (
"github.com/cshum/imagor"
"github.com/cshum/imagor/imagorpath"
"github.com/cshum/imagor/loader/httploader"
"github.com/cshum/imagor/server"
"github.com/cshum/imagor/storage/filestorage"
"github.com/cshum/imagor/vips"
"github.com/kumparan/imagor"
"github.com/kumparan/imagor/imagorpath"
"github.com/kumparan/imagor/loader/httploader"
"github.com/kumparan/imagor/server"
"github.com/kumparan/imagor/storage/filestorage"
"github.com/kumparan/imagor/vips"
"go.uber.org/zap"
)

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

import (
"github.com/cshum/imagor/vips"
"github.com/kumparan/imagor/vips"
"net/http"
"os"
)
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/cshum/imagor
module github.com/kumparan/imagor

go 1.22

Expand Down
Loading