Skip to content

Commit

Permalink
ref: move models to pkg
Browse files Browse the repository at this point in the history
This makes it possible for other projects to use the same model
definitions when making requests to the API.
  • Loading branch information
crazybolillo committed Oct 6, 2024
1 parent 567eaae commit 22bc791
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/handler/authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"context"
"encoding/json"
"github.com/crazybolillo/eryth/internal/model"
"github.com/crazybolillo/eryth/pkg/model"
"github.com/go-chi/chi/v5"
"log/slog"
"net/http"
Expand Down
2 changes: 1 addition & 1 deletion internal/handler/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package handler
import (
"encoding/json"
"errors"
"github.com/crazybolillo/eryth/internal/model"
"github.com/crazybolillo/eryth/internal/query"
"github.com/crazybolillo/eryth/internal/service"
"github.com/crazybolillo/eryth/pkg/model"
"github.com/go-chi/chi/v5"
"github.com/jackc/pgx/v5"
"log/slog"
Expand Down
2 changes: 1 addition & 1 deletion internal/handler/endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/crazybolillo/eryth/internal/model"
"github.com/crazybolillo/eryth/internal/service"
"github.com/crazybolillo/eryth/pkg/model"
"github.com/jackc/pgx/v5"
"net/http"
"net/http/httptest"
Expand Down
2 changes: 1 addition & 1 deletion internal/service/bouncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package service
import (
"context"
"github.com/crazybolillo/eryth/internal/db"
"github.com/crazybolillo/eryth/internal/model"
"github.com/crazybolillo/eryth/internal/sqlc"
"github.com/crazybolillo/eryth/pkg/model"
"log/slog"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/service/contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package service
import (
"context"
"errors"
"github.com/crazybolillo/eryth/internal/model"
"github.com/crazybolillo/eryth/internal/sqlc"
"github.com/crazybolillo/eryth/pkg/model"
"github.com/jackc/pgx/v5"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/service/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"encoding/hex"
"fmt"
"github.com/crazybolillo/eryth/internal/db"
"github.com/crazybolillo/eryth/internal/model"
"github.com/crazybolillo/eryth/internal/sqlc"
"github.com/crazybolillo/eryth/pkg/model"
"strings"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 22bc791

Please sign in to comment.