Skip to content

Commit 39bb4d8

Browse files
authored
restructure: update packages as per odpf conventions (#137)
* restructure: update packages as per odpf conventions * restructure: update server packges * chore: update buf file * chore: update buf file
1 parent 7d365c0 commit 39bb4d8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+78
-74
lines changed

buf.gen.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
version: v1
22
plugins:
33
- name: go
4-
out: ./server
4+
out: ./proto
55
opt: paths=source_relative
66
- name: go-grpc
7-
out: ./server
7+
out: ./proto
88
opt: paths=source_relative
9+
- remote: buf.build/odpf/plugins/validate
10+
out: "proto"
11+
opt: "paths=source_relative,lang=go"
912
- name: grpc-gateway
10-
out: ./server
13+
out: ./proto
1114
opt: paths=source_relative
1215
- name: openapiv2
13-
out: ./server
16+
out: ./proto
17+
opt: "allow_merge=true"

cmd/namespace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/MakeNowJust/heredoc"
99
"github.com/odpf/salt/printer"
1010
"github.com/odpf/salt/term"
11-
stencilv1beta1 "github.com/odpf/stencil/server/odpf/stencil/v1beta1"
11+
stencilv1beta1 "github.com/odpf/stencil/proto/odpf/stencil/v1beta1"
1212
"github.com/spf13/cobra"
1313
"google.golang.org/grpc"
1414
)

cmd/schema.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
"github.com/jhump/protoreflect/desc"
1515
"github.com/jhump/protoreflect/desc/protoprint"
1616
"github.com/odpf/salt/printer"
17-
"github.com/odpf/stencil/graph"
18-
stencilv1beta1 "github.com/odpf/stencil/server/odpf/stencil/v1beta1"
17+
"github.com/odpf/stencil/pkg/graph"
18+
stencilv1beta1 "github.com/odpf/stencil/proto/odpf/stencil/v1beta1"
1919
"github.com/spf13/cobra"
2020
"github.com/yudai/gojsondiff"
2121
"github.com/yudai/gojsondiff/formatter"

cmd/search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
"github.com/MakeNowJust/heredoc"
1111
"github.com/odpf/salt/printer"
12-
stencilv1beta1 "github.com/odpf/stencil/server/odpf/stencil/v1beta1"
12+
stencilv1beta1 "github.com/odpf/stencil/proto/odpf/stencil/v1beta1"
1313
"github.com/spf13/cobra"
1414
"google.golang.org/grpc"
1515
)

cmd/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package cmd
33
import (
44
"github.com/MakeNowJust/heredoc"
55
"github.com/odpf/stencil/config"
6-
"github.com/odpf/stencil/server"
7-
"github.com/odpf/stencil/store/postgres"
6+
"github.com/odpf/stencil/internal/server"
7+
"github.com/odpf/stencil/internal/store/postgres"
88
"github.com/spf13/cobra"
99

1010
// Importing postgres driver

server/namespace/service.go renamed to core/namespace/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package namespace
33
import (
44
"context"
55

6-
"github.com/odpf/stencil/server/domain"
6+
"github.com/odpf/stencil/domain"
77
)
88

99
type Service struct {
File renamed without changes.

server/schema/models.go renamed to core/schema/models.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package schema
22

33
import (
4-
"github.com/odpf/stencil/server/domain"
4+
"github.com/odpf/stencil/domain"
55
)
66

77
type ParsedSchema interface {

server/schema/provider/provider.go renamed to core/schema/provider/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ package provider
33
import (
44
"errors"
55

6+
"github.com/odpf/stencil/core/schema"
67
"github.com/odpf/stencil/formats/avro"
78
"github.com/odpf/stencil/formats/json"
89
"github.com/odpf/stencil/formats/protobuf"
9-
"github.com/odpf/stencil/server/schema"
1010
)
1111

1212
type parseFn func([]byte) (schema.ParsedSchema, error)

server/schema/service.go renamed to core/schema/service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"fmt"
77

88
"github.com/google/uuid"
9-
"github.com/odpf/stencil/server/domain"
10-
"github.com/odpf/stencil/store"
9+
"github.com/odpf/stencil/domain"
10+
"github.com/odpf/stencil/internal/store"
1111
)
1212

1313
func getNonEmpty(args ...string) string {

0 commit comments

Comments
 (0)