Skip to content

Commit

Permalink
Change go mod and package to add domain namespacing (github.com/proje…
Browse files Browse the repository at this point in the history
…ct-kessel).
  • Loading branch information
merlante committed Jun 18, 2024
1 parent c197e9a commit e6fe539
Show file tree
Hide file tree
Showing 30 changed files with 84 additions and 74 deletions.
10 changes: 6 additions & 4 deletions api/health/v1/health.pb.go

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

2 changes: 1 addition & 1 deletion api/health/v1/health.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package kessel.relations.v1;

import "google/api/annotations.proto";

option go_package = "relations-api/api/health/v1;v1";
option go_package = "github.com/project-kessel/relations-api/api/health/v1;v1";
option java_multiple_files = true;
option java_package = "org.project_kessel.api.relations.v1";

Expand Down
12 changes: 7 additions & 5 deletions api/relations/v0/check.pb.go

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

2 changes: 1 addition & 1 deletion api/relations/v0/check.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package kessel.relations.v0;
import "google/api/annotations.proto";
import "relations/v0/common.proto";

option go_package = "relations-api/api/relations/v0;v0";
option go_package = "github.com/project-kessel/relations-api/api/relations/v0;v0";
option java_multiple_files = true;
option java_package = "org.project_kessel.api.relations.v0";

Expand Down
10 changes: 6 additions & 4 deletions api/relations/v0/common.pb.go

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

2 changes: 1 addition & 1 deletion api/relations/v0/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package kessel.relations.v0;

option go_package = "relations-api/api/relations/v0;v0";
option go_package = "github.com/project-kessel/relations-api/api/relations/v0;v0";
option java_multiple_files = true;
option java_package = "org.project_kessel.api.relations.v0";

Expand Down
10 changes: 6 additions & 4 deletions api/relations/v0/lookup.pb.go

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

2 changes: 1 addition & 1 deletion api/relations/v0/lookup.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package kessel.relations.v0;
import "google/api/annotations.proto";
import "relations/v0/common.proto";

option go_package = "relations-api/api/relations/v0;v0";
option go_package = "github.com/project-kessel/relations-api/api/relations/v0;v0";
option java_multiple_files = true;
option java_package = "org.project_kessel.api.relations.v0";

Expand Down
11 changes: 6 additions & 5 deletions api/relations/v0/relation_tuples.pb.go

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

2 changes: 1 addition & 1 deletion api/relations/v0/relation_tuples.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package kessel.relations.v0;
import "google/api/annotations.proto";
import "relations/v0/common.proto";

option go_package = "relations-api/api/relations/v0;v0";
option go_package = "github.com/project-kessel/relations-api/api/relations/v0;v0";
option java_multiple_files = true;
option java_package = "org.project_kessel.api.relations.v0";

Expand Down
2 changes: 1 addition & 1 deletion cmd/relations-api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/go-kratos/kratos/v2/config/env"
"os"

"relations-api/internal/conf"
"github.com/project-kessel/relations-api/internal/conf"

"github.com/go-kratos/kratos/v2"
"github.com/go-kratos/kratos/v2/config"
Expand Down
10 changes: 5 additions & 5 deletions cmd/relations-api/wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
package main

import (
"relations-api/internal/biz"
"relations-api/internal/conf"
"relations-api/internal/data"
"relations-api/internal/server"
"relations-api/internal/service"
"github.com/project-kessel/relations-api/internal/biz"
"github.com/project-kessel/relations-api/internal/conf"
"github.com/project-kessel/relations-api/internal/data"
"github.com/project-kessel/relations-api/internal/server"
"github.com/project-kessel/relations-api/internal/service"

"github.com/go-kratos/kratos/v2"
"github.com/go-kratos/kratos/v2/log"
Expand Down
10 changes: 5 additions & 5 deletions cmd/relations-api/wire_gen.go

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

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module relations-api
module github.com/project-kessel/relations-api

go 1.21

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

import (
"context"
v0 "relations-api/api/relations/v0"
v0 "github.com/project-kessel/relations-api/api/relations/v0"

"github.com/go-kratos/kratos/v2/errors"
"github.com/go-kratos/kratos/v2/log"
Expand Down
2 changes: 1 addition & 1 deletion internal/biz/relationships.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package biz

import (
"context"
v0 "relations-api/api/relations/v0"
v0 "github.com/project-kessel/relations-api/api/relations/v0"

"github.com/go-kratos/kratos/v2/log"
)
Expand Down
9 changes: 5 additions & 4 deletions internal/conf/conf.pb.go

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

2 changes: 1 addition & 1 deletion internal/conf/conf.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package kratos.api;

option go_package = "relations-api/internal/conf;conf";
option go_package = "github.com/project-kessel/relations-api/internal/conf;conf";

import "google/protobuf/duration.proto";

Expand Down
2 changes: 1 addition & 1 deletion internal/data/LocalSpiceDbContainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"fmt"
"github.com/authzed/authzed-go/v1"
"github.com/go-kratos/kratos/v2/log"
"github.com/project-kessel/relations-api/internal/conf"
"io"
"os"
"path"
"path/filepath"
"relations-api/internal/conf"
"runtime"
"time"

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

import (
"github.com/google/wire"
"relations-api/internal/biz"
"github.com/project-kessel/relations-api/internal/biz"
)

// ProviderSet is data providers.
Expand Down
6 changes: 3 additions & 3 deletions internal/data/spicedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"context"
"errors"
"fmt"
apiV0 "github.com/project-kessel/relations-api/api/relations/v0"
"github.com/project-kessel/relations-api/internal/biz"
"github.com/project-kessel/relations-api/internal/conf"
"io"
"os"
apiV0 "relations-api/api/relations/v0"
"relations-api/internal/biz"
"relations-api/internal/conf"
"strings"

v1 "github.com/authzed/authzed-go/proto/authzed/api/v1"
Expand Down
4 changes: 2 additions & 2 deletions internal/data/spicedb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package data
import (
"context"
"fmt"
apiV0 "github.com/project-kessel/relations-api/api/relations/v0"
"github.com/project-kessel/relations-api/internal/biz"
"os"
apiV0 "relations-api/api/relations/v0"
"relations-api/internal/biz"
"testing"

"github.com/go-kratos/kratos/v2/log"
Expand Down
8 changes: 4 additions & 4 deletions internal/server/grpc.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package server

import (
h "relations-api/api/health/v1"
v0 "relations-api/api/relations/v0"
"relations-api/internal/conf"
"relations-api/internal/service"
h "github.com/project-kessel/relations-api/api/health/v1"
v0 "github.com/project-kessel/relations-api/api/relations/v0"
"github.com/project-kessel/relations-api/internal/conf"
"github.com/project-kessel/relations-api/internal/service"

"github.com/go-kratos/kratos/v2/log"
"github.com/go-kratos/kratos/v2/middleware/recovery"
Expand Down
8 changes: 4 additions & 4 deletions internal/server/http.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package server

import (
h "relations-api/api/health/v1"
v0 "relations-api/api/relations/v0"
"relations-api/internal/conf"
"relations-api/internal/service"
h "github.com/project-kessel/relations-api/api/health/v1"
v0 "github.com/project-kessel/relations-api/api/relations/v0"
"github.com/project-kessel/relations-api/internal/conf"
"github.com/project-kessel/relations-api/internal/service"

"github.com/go-kratos/kratos/v2/log"
"github.com/go-kratos/kratos/v2/middleware/recovery"
Expand Down
4 changes: 2 additions & 2 deletions internal/service/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package service

import (
"context"
"relations-api/internal/biz"
"github.com/project-kessel/relations-api/internal/biz"

"github.com/go-kratos/kratos/v2/log"

pb "relations-api/api/relations/v0"
pb "github.com/project-kessel/relations-api/api/relations/v0"
)

type CheckService struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/service/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package service
import (
"context"

pb "relations-api/api/health/v1"
pb "github.com/project-kessel/relations-api/api/health/v1"
)

type HealthService struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/service/lookup.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package service

import (
pb "relations-api/api/relations/v0"
"relations-api/internal/biz"
pb "github.com/project-kessel/relations-api/api/relations/v0"
"github.com/project-kessel/relations-api/internal/biz"
)

type LookupService struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/service/lookup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package service

import (
"context"
v0 "github.com/project-kessel/relations-api/api/relations/v0"
"github.com/project-kessel/relations-api/internal/biz"
"github.com/project-kessel/relations-api/internal/data"
"os"
v0 "relations-api/api/relations/v0"
"relations-api/internal/biz"
"relations-api/internal/data"
"testing"

"github.com/go-kratos/kratos/v2/log"
Expand Down
4 changes: 2 additions & 2 deletions internal/service/relationships.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package service

import (
"context"
"relations-api/internal/biz"
"github.com/project-kessel/relations-api/internal/biz"

"github.com/go-kratos/kratos/v2/log"

pb "relations-api/api/relations/v0"
pb "github.com/project-kessel/relations-api/api/relations/v0"
)

type RelationshipsService struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/service/relationships_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package service
import (
"context"
"fmt"
v0 "github.com/project-kessel/relations-api/api/relations/v0"
"github.com/project-kessel/relations-api/internal/biz"
"github.com/project-kessel/relations-api/internal/data"
"os"
v0 "relations-api/api/relations/v0"
"relations-api/internal/biz"
"relations-api/internal/data"
"testing"

"github.com/go-kratos/kratos/v2/log"
Expand Down

0 comments on commit e6fe539

Please sign in to comment.