Skip to content

Commit

Permalink
refactor: Store file structure
Browse files Browse the repository at this point in the history
Signed-off-by: jay-dee7 <[email protected]>
  • Loading branch information
jay-dee7 committed Nov 17, 2023
1 parent c34b4ed commit b1cb2c5
Show file tree
Hide file tree
Showing 64 changed files with 75 additions and 75 deletions.
2 changes: 1 addition & 1 deletion auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/containerish/OpenRegistry/config"
"github.com/containerish/OpenRegistry/services/email"
"github.com/containerish/OpenRegistry/store/v2/users"
"github.com/containerish/OpenRegistry/store/v1/users"
"github.com/containerish/OpenRegistry/telemetry"
gh "github.com/google/go-github/v50/github"
"github.com/labstack/echo/v4"
Expand Down
2 changes: 1 addition & 1 deletion auth/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/containerish/OpenRegistry/config"
v2_types "github.com/containerish/OpenRegistry/store/v2/types"
v2_types "github.com/containerish/OpenRegistry/store/v1/types"
"github.com/containerish/OpenRegistry/types"
"github.com/google/go-github/v53/github"
"github.com/google/uuid"
Expand Down
2 changes: 1 addition & 1 deletion auth/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"time"

"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/golang-jwt/jwt/v5"
"github.com/google/uuid"
"golang.org/x/oauth2"
Expand Down
2 changes: 1 addition & 1 deletion auth/jwt_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"time"

"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/golang-jwt/jwt/v5"
"github.com/google/uuid"
echo_jwt "github.com/labstack/echo-jwt/v4"
Expand Down
2 changes: 1 addition & 1 deletion auth/reset_password.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"time"

"github.com/containerish/OpenRegistry/services/email"
v2_types "github.com/containerish/OpenRegistry/store/v2/types"
v2_types "github.com/containerish/OpenRegistry/store/v1/types"
"github.com/containerish/OpenRegistry/types"
"github.com/golang-jwt/jwt/v5"
"github.com/google/uuid"
Expand Down
6 changes: 3 additions & 3 deletions auth/server/webauthn_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"github.com/containerish/OpenRegistry/auth"
"github.com/containerish/OpenRegistry/auth/webauthn"
"github.com/containerish/OpenRegistry/config"
v2_types "github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v2/users"
webauthn_store "github.com/containerish/OpenRegistry/store/v2/webauthn"
v2_types "github.com/containerish/OpenRegistry/store/v1/types"
"github.com/containerish/OpenRegistry/store/v1/users"
webauthn_store "github.com/containerish/OpenRegistry/store/v1/webauthn"
"github.com/containerish/OpenRegistry/telemetry"
"github.com/containerish/OpenRegistry/types"
"github.com/google/uuid"
Expand Down
2 changes: 1 addition & 1 deletion auth/signin.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"time"

v2_types "github.com/containerish/OpenRegistry/store/v2/types"
v2_types "github.com/containerish/OpenRegistry/store/v1/types"
"github.com/containerish/OpenRegistry/types"
"github.com/google/uuid"
"github.com/jackc/pgx/v4"
Expand Down
4 changes: 2 additions & 2 deletions auth/signup.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/containerish/OpenRegistry/config"
"github.com/containerish/OpenRegistry/services/email"
store_err "github.com/containerish/OpenRegistry/store/v2"
v2_types "github.com/containerish/OpenRegistry/store/v2/types"
store_err "github.com/containerish/OpenRegistry/store/v1"
v2_types "github.com/containerish/OpenRegistry/store/v1/types"
"github.com/containerish/OpenRegistry/types"
"github.com/google/uuid"
"github.com/labstack/echo/v4"
Expand Down
2 changes: 1 addition & 1 deletion auth/webauthn/types.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package webauthn

import (
"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/go-webauthn/webauthn/protocol"
"github.com/go-webauthn/webauthn/webauthn"
)
Expand Down
2 changes: 1 addition & 1 deletion auth/webauthn/webauthn.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"

"github.com/containerish/OpenRegistry/config"
webauthn_store "github.com/containerish/OpenRegistry/store/v2/webauthn"
webauthn_store "github.com/containerish/OpenRegistry/store/v1/webauthn"
"github.com/fatih/color"
"github.com/go-webauthn/webauthn/protocol"
"github.com/go-webauthn/webauthn/webauthn"
Expand Down
2 changes: 1 addition & 1 deletion cmd/migrations/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"time"

"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/fatih/color"
"github.com/uptrace/bun"
"github.com/uptrace/bun/dialect/pgdialect"
Expand Down
2 changes: 1 addition & 1 deletion cmd/migrations/migrationsGenerate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package migrations
import (
"fmt"

"github.com/containerish/OpenRegistry/store/v2/migrations"
"github.com/containerish/OpenRegistry/store/v1/migrations"
"github.com/fatih/color"
"github.com/uptrace/bun/migrate"
"github.com/urfave/cli/v2"
Expand Down
2 changes: 1 addition & 1 deletion cmd/migrations/migrationsInit.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"strings"

"github.com/containerish/OpenRegistry/store/v2/migrations"
"github.com/containerish/OpenRegistry/store/v1/migrations"
"github.com/fatih/color"
"github.com/urfave/cli/v2"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/migrations/migrationsReset.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package migrations

import (
"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/urfave/cli/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/migrations/migrationsRollback.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package migrations
import (
"errors"

"github.com/containerish/OpenRegistry/store/v2/migrations"
"github.com/containerish/OpenRegistry/store/v1/migrations"
"github.com/fatih/color"
"github.com/urfave/cli/v2"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/migrations/migrationsRun.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package migrations

import (
"github.com/containerish/OpenRegistry/store/v2/migrations"
"github.com/containerish/OpenRegistry/store/v1/migrations"
"github.com/urfave/cli/v2"
)

Expand Down
14 changes: 7 additions & 7 deletions cmd/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import (
"github.com/containerish/OpenRegistry/registry/v2/extensions"
"github.com/containerish/OpenRegistry/router"
github_actions_server "github.com/containerish/OpenRegistry/services/kon/github_actions/v1/server"
store_v2 "github.com/containerish/OpenRegistry/store/v2"
"github.com/containerish/OpenRegistry/store/v2/automation"
"github.com/containerish/OpenRegistry/store/v2/emails"
registry_store "github.com/containerish/OpenRegistry/store/v2/registry"
"github.com/containerish/OpenRegistry/store/v2/sessions"
"github.com/containerish/OpenRegistry/store/v2/users"
"github.com/containerish/OpenRegistry/store/v2/webauthn"
store_v2 "github.com/containerish/OpenRegistry/store/v1"
"github.com/containerish/OpenRegistry/store/v1/automation"
"github.com/containerish/OpenRegistry/store/v1/emails"
registry_store "github.com/containerish/OpenRegistry/store/v1/registry"
"github.com/containerish/OpenRegistry/store/v1/sessions"
"github.com/containerish/OpenRegistry/store/v1/users"
"github.com/containerish/OpenRegistry/store/v1/webauthn"
"github.com/containerish/OpenRegistry/telemetry"
"github.com/containerish/OpenRegistry/telemetry/otel"
"github.com/containerish/OpenRegistry/vcs/github"
Expand Down
2 changes: 1 addition & 1 deletion dfs/dfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

s3types "github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/containerish/OpenRegistry/config"
"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
)

type DFS interface {
Expand Down
2 changes: 1 addition & 1 deletion dfs/filebase/filebase.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
s3types "github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/containerish/OpenRegistry/config"
"github.com/containerish/OpenRegistry/dfs"
"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
oci_digest "github.com/opencontainers/go-digest"
)

Expand Down
2 changes: 1 addition & 1 deletion dfs/mock/mockFileSystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
s3types "github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/containerish/OpenRegistry/config"
"github.com/containerish/OpenRegistry/dfs"
types "github.com/containerish/OpenRegistry/store/v2/types"
types "github.com/containerish/OpenRegistry/store/v1/types"
"github.com/fatih/color"
"github.com/google/uuid"
"github.com/labstack/echo/v4"
Expand Down
2 changes: 1 addition & 1 deletion dfs/mock/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
s3types "github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/containerish/OpenRegistry/config"
"github.com/containerish/OpenRegistry/dfs"
types "github.com/containerish/OpenRegistry/store/v2/types"
types "github.com/containerish/OpenRegistry/store/v1/types"
"github.com/fatih/color"
"github.com/google/uuid"
"github.com/labstack/echo/v4"
Expand Down
2 changes: 1 addition & 1 deletion dfs/storj/storj.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
s3types "github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/containerish/OpenRegistry/config"
"github.com/containerish/OpenRegistry/dfs"
"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
oci_digest "github.com/opencontainers/go-digest"
)

Expand Down
2 changes: 1 addition & 1 deletion dfs/storj/uplink/uplink.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
s3types "github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/containerish/OpenRegistry/config"
"github.com/containerish/OpenRegistry/dfs"
"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/fatih/color"
"storj.io/uplink"
"storj.io/uplink/edge"
Expand Down
2 changes: 1 addition & 1 deletion health-checks/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"

"github.com/alexliesenfeld/health"
store_v2 "github.com/containerish/OpenRegistry/store/v2"
store_v2 "github.com/containerish/OpenRegistry/store/v1"
)

func NewHealthChecksAPI(pgPing store_v2.PostgresPing) http.HandlerFunc {
Expand Down
4 changes: 2 additions & 2 deletions registry/v2/extensions/catalog_detail.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strconv"
"time"

"github.com/containerish/OpenRegistry/store/v2/registry"
"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/registry"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/containerish/OpenRegistry/telemetry"
"github.com/labstack/echo/v4"
)
Expand Down
2 changes: 1 addition & 1 deletion registry/v2/extensions/private_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"time"

"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/labstack/echo/v4"
)

Expand Down
4 changes: 2 additions & 2 deletions registry/v2/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
s3types "github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/containerish/OpenRegistry/config"
dfsImpl "github.com/containerish/OpenRegistry/dfs"
store_v2 "github.com/containerish/OpenRegistry/store/v2/registry"
types_v2 "github.com/containerish/OpenRegistry/store/v2/types"
store_v2 "github.com/containerish/OpenRegistry/store/v1/registry"
types_v2 "github.com/containerish/OpenRegistry/store/v1/types"
"github.com/containerish/OpenRegistry/telemetry"
"github.com/containerish/OpenRegistry/types"
"github.com/labstack/echo/v4"
Expand Down
2 changes: 1 addition & 1 deletion registry/v2/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"time"

"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/go-playground/validator/v10"
"github.com/google/uuid"
"github.com/labstack/echo/v4"
Expand Down
2 changes: 1 addition & 1 deletion registry/v2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
s3types "github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/containerish/OpenRegistry/config"
dfsImpl "github.com/containerish/OpenRegistry/dfs"
store_v2 "github.com/containerish/OpenRegistry/store/v2/registry"
store_v2 "github.com/containerish/OpenRegistry/store/v1/registry"
"github.com/containerish/OpenRegistry/telemetry"
"github.com/labstack/echo/v4"
"github.com/uptrace/bun"
Expand Down
4 changes: 2 additions & 2 deletions router/middlewares.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"regexp"

"github.com/containerish/OpenRegistry/registry/v2"
registry_store "github.com/containerish/OpenRegistry/store/v2/registry"
"github.com/containerish/OpenRegistry/store/v2/types"
registry_store "github.com/containerish/OpenRegistry/store/v1/registry"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/labstack/echo/v4"
dist_spec "github.com/opencontainers/distribution-spec/specs-go/v1"
)
Expand Down
2 changes: 1 addition & 1 deletion router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/containerish/OpenRegistry/config"
"github.com/containerish/OpenRegistry/registry/v2"
"github.com/containerish/OpenRegistry/registry/v2/extensions"
registry_store "github.com/containerish/OpenRegistry/store/v2/registry"
registry_store "github.com/containerish/OpenRegistry/store/v1/registry"
"github.com/google/uuid"
"github.com/labstack/echo-contrib/prometheus"
"github.com/labstack/echo/v4"
Expand Down
2 changes: 1 addition & 1 deletion services/email/createEmail.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package email
import (
"fmt"

"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/sendgrid/sendgrid-go/helpers/mail"
)

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

import (
"github.com/containerish/OpenRegistry/config"
"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/helpers/mail"
)
Expand Down
2 changes: 1 addition & 1 deletion services/email/sendEmail.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"net/http"

"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion services/kon/github_actions/v1/server/build_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
connect_go "github.com/bufbuild/connect-go"
common_v1 "github.com/containerish/OpenRegistry/common/v1"
v1 "github.com/containerish/OpenRegistry/services/kon/github_actions/v1"
"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/google/go-github/v50/github"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
Expand Down
2 changes: 1 addition & 1 deletion services/kon/github_actions/v1/server/build_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
connect_go "github.com/bufbuild/connect-go"
common_v1 "github.com/containerish/OpenRegistry/common/v1"
github_actions_v1 "github.com/containerish/OpenRegistry/services/kon/github_actions/v1"
"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/containerish/OpenRegistry/vcs/github"
"github.com/google/uuid"
"google.golang.org/protobuf/types/known/timestamppb"
Expand Down
2 changes: 1 addition & 1 deletion services/kon/github_actions/v1/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/containerish/OpenRegistry/config"
github_actions_v1 "github.com/containerish/OpenRegistry/services/kon/github_actions/v1"
connect_v1 "github.com/containerish/OpenRegistry/services/kon/github_actions/v1/github_actions_v1connect"
"github.com/containerish/OpenRegistry/store/v2/automation"
"github.com/containerish/OpenRegistry/store/v1/automation"
"github.com/containerish/OpenRegistry/telemetry"
"github.com/containerish/OpenRegistry/vcs"
"github.com/fatih/color"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

common_v1 "github.com/containerish/OpenRegistry/common/v1"
gha_v1 "github.com/containerish/OpenRegistry/services/kon/github_actions/v1"
"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/google/uuid"
"github.com/uptrace/bun"
durationpb "google.golang.org/protobuf/types/known/durationpb"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

common_v1 "github.com/containerish/OpenRegistry/common/v1"
github_actions_v1 "github.com/containerish/OpenRegistry/services/kon/github_actions/v1"
"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/google/uuid"
"google.golang.org/protobuf/types/known/timestamppb"
)
Expand Down
2 changes: 1 addition & 1 deletion store/v2/base.go → store/v1/base.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v2
package v1

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package emails
import (
"context"

v2 "github.com/containerish/OpenRegistry/store/v2"
"github.com/containerish/OpenRegistry/store/v2/types"
"github.com/containerish/OpenRegistry/store/v2/users"
v2 "github.com/containerish/OpenRegistry/store/v1"
"github.com/containerish/OpenRegistry/store/v1/types"
"github.com/containerish/OpenRegistry/store/v1/users"
"github.com/google/uuid"
"github.com/uptrace/bun"
)
Expand Down
2 changes: 1 addition & 1 deletion store/v2/error_builder.go → store/v1/error_builder.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v2
package v1

import (
"errors"
Expand Down
Loading

0 comments on commit b1cb2c5

Please sign in to comment.