Skip to content

Commit

Permalink
refactor!: bumping version to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
rafael-piovesan committed May 22, 2022
1 parent 86f2094 commit ce2e66e
Show file tree
Hide file tree
Showing 28 changed files with 70 additions and 70 deletions.
2 changes: 1 addition & 1 deletion api/http/handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/go-playground/validator/v10"
"github.com/labstack/echo/v4"
"github.com/rafael-piovesan/go-rocket-ride/entity"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
)

type Handler struct {
Expand Down
4 changes: 2 additions & 2 deletions api/http/handler/ride.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"math"

"github.com/labstack/echo/v4"
rocketride "github.com/rafael-piovesan/go-rocket-ride"
"github.com/rafael-piovesan/go-rocket-ride/entity"
rocketride "github.com/rafael-piovesan/go-rocket-ride/v2"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
)

type createRequest struct {
Expand Down
6 changes: 3 additions & 3 deletions api/http/handler/ride_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (

"github.com/brianvoe/gofakeit/v6"
"github.com/labstack/echo/v4"
"github.com/rafael-piovesan/go-rocket-ride/entity"
"github.com/rafael-piovesan/go-rocket-ride/entity/idempotency"
"github.com/rafael-piovesan/go-rocket-ride/mocks"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity/idempotency"
"github.com/rafael-piovesan/go-rocket-ride/v2/mocks"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion api/http/middleware/originip.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package middleware

import (
"github.com/labstack/echo/v4"
"github.com/rafael-piovesan/go-rocket-ride/entity/originip"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity/originip"
)

type IPMiddleware struct{}
Expand Down
4 changes: 2 additions & 2 deletions api/http/middleware/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/go-playground/validator/v10"
"github.com/labstack/echo/v4"
rocketride "github.com/rafael-piovesan/go-rocket-ride"
"github.com/rafael-piovesan/go-rocket-ride/entity"
rocketride "github.com/rafael-piovesan/go-rocket-ride/v2"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
)

type userRequest struct {
Expand Down
8 changes: 4 additions & 4 deletions api/http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
"github.com/labstack/gommon/log"
rocketride "github.com/rafael-piovesan/go-rocket-ride"
"github.com/rafael-piovesan/go-rocket-ride/api/http/handler"
cstmiddleware "github.com/rafael-piovesan/go-rocket-ride/api/http/middleware"
"github.com/rafael-piovesan/go-rocket-ride/usecase"
rocketride "github.com/rafael-piovesan/go-rocket-ride/v2"
"github.com/rafael-piovesan/go-rocket-ride/v2/api/http/handler"
cstmiddleware "github.com/rafael-piovesan/go-rocket-ride/v2/api/http/middleware"
"github.com/rafael-piovesan/go-rocket-ride/v2/usecase"
)

type Server struct {
Expand Down
8 changes: 4 additions & 4 deletions cmd/api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"log"

rocketride "github.com/rafael-piovesan/go-rocket-ride"
"github.com/rafael-piovesan/go-rocket-ride/api/http"
bunstore "github.com/rafael-piovesan/go-rocket-ride/datastore/bun"
"github.com/rafael-piovesan/go-rocket-ride/pkg/stripemock"
rocketride "github.com/rafael-piovesan/go-rocket-ride/v2"
"github.com/rafael-piovesan/go-rocket-ride/v2/api/http"
bunstore "github.com/rafael-piovesan/go-rocket-ride/v2/datastore/bun"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/stripemock"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion datastore/bun/audit_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package bun
import (
"context"

"github.com/rafael-piovesan/go-rocket-ride/entity"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
)

func (s *sqlStore) CreateAuditRecord(ctx context.Context, ar *entity.AuditRecord) (*entity.AuditRecord, error) {
Expand Down
10 changes: 5 additions & 5 deletions datastore/bun/audit_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"testing"

"github.com/brianvoe/gofakeit/v6"
"github.com/rafael-piovesan/go-rocket-ride/entity"
"github.com/rafael-piovesan/go-rocket-ride/entity/audit"
"github.com/rafael-piovesan/go-rocket-ride/pkg/migrate"
"github.com/rafael-piovesan/go-rocket-ride/pkg/testcontainer"
"github.com/rafael-piovesan/go-rocket-ride/pkg/testfixtures"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity/audit"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/migrate"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/testcontainer"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/testfixtures"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/tabbed/pqtype"
Expand Down
2 changes: 1 addition & 1 deletion datastore/bun/idempotency_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"database/sql"
"errors"

"github.com/rafael-piovesan/go-rocket-ride/entity"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
)

func (s *sqlStore) CreateIdempotencyKey(
Expand Down
10 changes: 5 additions & 5 deletions datastore/bun/idempotency_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"time"

"github.com/brianvoe/gofakeit/v6"
"github.com/rafael-piovesan/go-rocket-ride/entity"
"github.com/rafael-piovesan/go-rocket-ride/entity/idempotency"
"github.com/rafael-piovesan/go-rocket-ride/pkg/migrate"
"github.com/rafael-piovesan/go-rocket-ride/pkg/testcontainer"
"github.com/rafael-piovesan/go-rocket-ride/pkg/testfixtures"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity/idempotency"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/migrate"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/testcontainer"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/testfixtures"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion datastore/bun/ride.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"database/sql"
"errors"

"github.com/rafael-piovesan/go-rocket-ride/entity"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
)

func (s *sqlStore) CreateRide(ctx context.Context, rd *entity.Ride) (*entity.Ride, error) {
Expand Down
8 changes: 4 additions & 4 deletions datastore/bun/ride_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"testing"

"github.com/brianvoe/gofakeit/v6"
"github.com/rafael-piovesan/go-rocket-ride/entity"
"github.com/rafael-piovesan/go-rocket-ride/pkg/migrate"
"github.com/rafael-piovesan/go-rocket-ride/pkg/testcontainer"
"github.com/rafael-piovesan/go-rocket-ride/pkg/testfixtures"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/migrate"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/testcontainer"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/testfixtures"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion datastore/bun/sqlstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
// loading bun's official Postgres driver.
_ "github.com/uptrace/bun/driver/pgdriver"

rocketride "github.com/rafael-piovesan/go-rocket-ride"
rocketride "github.com/rafael-piovesan/go-rocket-ride/v2"
)

type sqlStore struct {
Expand Down
12 changes: 6 additions & 6 deletions datastore/bun/sqlstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"testing"

"github.com/brianvoe/gofakeit/v6"
rocketride "github.com/rafael-piovesan/go-rocket-ride"
"github.com/rafael-piovesan/go-rocket-ride/entity"
"github.com/rafael-piovesan/go-rocket-ride/entity/audit"
"github.com/rafael-piovesan/go-rocket-ride/pkg/migrate"
"github.com/rafael-piovesan/go-rocket-ride/pkg/testcontainer"
"github.com/rafael-piovesan/go-rocket-ride/pkg/testfixtures"
rocketride "github.com/rafael-piovesan/go-rocket-ride/v2"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity/audit"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/migrate"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/testcontainer"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/testfixtures"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/tabbed/pqtype"
Expand Down
2 changes: 1 addition & 1 deletion datastore/bun/staged_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package bun
import (
"context"

"github.com/rafael-piovesan/go-rocket-ride/entity"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
)

func (s *sqlStore) CreateStagedJob(ctx context.Context, sj *entity.StagedJob) (*entity.StagedJob, error) {
Expand Down
8 changes: 4 additions & 4 deletions datastore/bun/staged_job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"context"
"testing"

"github.com/rafael-piovesan/go-rocket-ride/entity"
"github.com/rafael-piovesan/go-rocket-ride/entity/stagedjob"
"github.com/rafael-piovesan/go-rocket-ride/pkg/migrate"
"github.com/rafael-piovesan/go-rocket-ride/pkg/testcontainer"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity/stagedjob"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/migrate"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/testcontainer"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion datastore/bun/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"errors"
"strings"

"github.com/rafael-piovesan/go-rocket-ride/entity"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
)

func (s *sqlStore) GetUserByEmail(ctx context.Context, e string) (*entity.User, error) {
Expand Down
8 changes: 4 additions & 4 deletions datastore/bun/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"testing"

"github.com/brianvoe/gofakeit/v6"
"github.com/rafael-piovesan/go-rocket-ride/entity"
"github.com/rafael-piovesan/go-rocket-ride/pkg/migrate"
"github.com/rafael-piovesan/go-rocket-ride/pkg/testcontainer"
"github.com/rafael-piovesan/go-rocket-ride/pkg/testfixtures"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/migrate"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/testcontainer"
"github.com/rafael-piovesan/go-rocket-ride/v2/pkg/testfixtures"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion entity/audit_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"time"

"github.com/rafael-piovesan/go-rocket-ride/entity/audit"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity/audit"
)

type AuditRecord struct {
Expand Down
2 changes: 1 addition & 1 deletion entity/idempotency_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"time"

"github.com/rafael-piovesan/go-rocket-ride/entity/idempotency"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity/idempotency"
)

type IdempotencyKey struct {
Expand Down
2 changes: 1 addition & 1 deletion entity/staged_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package entity
import (
"encoding/json"

"github.com/rafael-piovesan/go-rocket-ride/entity/stagedjob"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity/stagedjob"
)

type StagedJob struct {
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/rafael-piovesan/go-rocket-ride
module github.com/rafael-piovesan/go-rocket-ride/v2

go 1.18

Expand Down
4 changes: 2 additions & 2 deletions mocks/Datastore.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mocks/RideUseCase.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

"github.com/rafael-piovesan/go-rocket-ride/entity"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
)

type Datastore interface {
Expand Down
12 changes: 6 additions & 6 deletions usecase/ride.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import (
"github.com/stripe/stripe-go/v72"
"github.com/stripe/stripe-go/v72/charge"

rocketride "github.com/rafael-piovesan/go-rocket-ride"
"github.com/rafael-piovesan/go-rocket-ride/entity"
"github.com/rafael-piovesan/go-rocket-ride/entity/audit"
"github.com/rafael-piovesan/go-rocket-ride/entity/idempotency"
"github.com/rafael-piovesan/go-rocket-ride/entity/originip"
"github.com/rafael-piovesan/go-rocket-ride/entity/stagedjob"
rocketride "github.com/rafael-piovesan/go-rocket-ride/v2"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity/audit"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity/idempotency"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity/originip"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity/stagedjob"
)

type rideUseCase struct {
Expand Down
10 changes: 5 additions & 5 deletions usecase/ride_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"time"

"github.com/brianvoe/gofakeit/v6"
rocketride "github.com/rafael-piovesan/go-rocket-ride"
"github.com/rafael-piovesan/go-rocket-ride/entity"
"github.com/rafael-piovesan/go-rocket-ride/entity/idempotency"
"github.com/rafael-piovesan/go-rocket-ride/entity/originip"
"github.com/rafael-piovesan/go-rocket-ride/mocks"
rocketride "github.com/rafael-piovesan/go-rocket-ride/v2"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity/idempotency"
"github.com/rafael-piovesan/go-rocket-ride/v2/entity/originip"
"github.com/rafael-piovesan/go-rocket-ride/v2/mocks"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
Expand Down

0 comments on commit ce2e66e

Please sign in to comment.