Skip to content

Commit

Permalink
rename conduit proto package to procutils (#65)
Browse files Browse the repository at this point in the history
* rename conduit proto package to procutils

* fix proto lint

* fix readme
  • Loading branch information
maha-hajja authored Jul 24, 2024
1 parent ddf6009 commit 7ce2390
Show file tree
Hide file tree
Showing 16 changed files with 156 additions and 152 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ generate:
.PHONY: proto-generate
proto-generate:
cd proto && buf generate

.PHONY: proto-lint
proto-lint:
cd proto && buf lint
4 changes: 2 additions & 2 deletions pconduit/doc.go → pprocutils/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package pconduit provides the functionality for Conduit to set up utilities
// Package pprocutils provides the functionality for Conduit to set up utilities
// for processors. DO NOT use this package directly.
package pconduit
package pprocutils
2 changes: 1 addition & 1 deletion pconduit/errors.go → pprocutils/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package pconduit
package pprocutils

import (
"math"
Expand Down
2 changes: 1 addition & 1 deletion pconduit/logger.go → pprocutils/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package pconduit
package pprocutils

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion pconduit/schema.go → pprocutils/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package pconduit
package pprocutils

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ package fromproto

import (
"github.com/conduitio/conduit-commons/schema"
"github.com/conduitio/conduit-processor-sdk/pconduit"
conduitv1 "github.com/conduitio/conduit-processor-sdk/proto/conduit/v1"
"github.com/conduitio/conduit-processor-sdk/pprocutils"
procutilsv1 "github.com/conduitio/conduit-processor-sdk/proto/procutils/v1"
)

func CreateSchemaRequest(req *conduitv1.CreateSchemaRequest) pconduit.CreateSchemaRequest {
return pconduit.CreateSchemaRequest{
func CreateSchemaRequest(req *procutilsv1.CreateSchemaRequest) pprocutils.CreateSchemaRequest {
return pprocutils.CreateSchemaRequest{
Subject: req.Subject,
Type: schema.Type(req.Type),
Bytes: req.Bytes,
}
}

func GetSchemaRequest(req *conduitv1.GetSchemaRequest) pconduit.GetSchemaRequest {
return pconduit.GetSchemaRequest{
func GetSchemaRequest(req *procutilsv1.GetSchemaRequest) pprocutils.GetSchemaRequest {
return pprocutils.GetSchemaRequest{
Subject: req.Subject,
Version: int(req.Version),
}
}

func CreateSchemaResponse(resp *conduitv1.CreateSchemaResponse) pconduit.CreateSchemaResponse {
return pconduit.CreateSchemaResponse{
func CreateSchemaResponse(resp *procutilsv1.CreateSchemaResponse) pprocutils.CreateSchemaResponse {
return pprocutils.CreateSchemaResponse{
Schema: schema.Schema{
Subject: resp.Schema.Subject,
Version: int(resp.Schema.Version),
Expand All @@ -46,8 +46,8 @@ func CreateSchemaResponse(resp *conduitv1.CreateSchemaResponse) pconduit.CreateS
}
}

func GetSchemaResponse(resp *conduitv1.GetSchemaResponse) pconduit.GetSchemaResponse {
return pconduit.GetSchemaResponse{
func GetSchemaResponse(resp *procutilsv1.GetSchemaResponse) pprocutils.GetSchemaResponse {
return pprocutils.GetSchemaResponse{
Schema: schema.Schema{
Subject: resp.Schema.Subject,
Version: int(resp.Schema.Version),
Expand Down
20 changes: 10 additions & 10 deletions pconduit/v1/toproto/schema.go → pprocutils/v1/toproto/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ package toproto

import (
schemav1 "github.com/conduitio/conduit-commons/proto/schema/v1"
"github.com/conduitio/conduit-processor-sdk/pconduit"
conduitv1 "github.com/conduitio/conduit-processor-sdk/proto/conduit/v1"
"github.com/conduitio/conduit-processor-sdk/pprocutils"
procutilsv1 "github.com/conduitio/conduit-processor-sdk/proto/procutils/v1"
)

func GetSchemaRequest(in pconduit.GetSchemaRequest) *conduitv1.GetSchemaRequest {
return &conduitv1.GetSchemaRequest{
func GetSchemaRequest(in pprocutils.GetSchemaRequest) *procutilsv1.GetSchemaRequest {
return &procutilsv1.GetSchemaRequest{
Subject: in.Subject,
Version: int32(in.Version),
}
}

func GetSchemaResponse(in pconduit.GetSchemaResponse) *conduitv1.GetSchemaResponse {
return &conduitv1.GetSchemaResponse{
func GetSchemaResponse(in pprocutils.GetSchemaResponse) *procutilsv1.GetSchemaResponse {
return &procutilsv1.GetSchemaResponse{
Schema: &schemav1.Schema{
Subject: in.Schema.Subject,
Version: int32(in.Schema.Version),
Expand All @@ -38,16 +38,16 @@ func GetSchemaResponse(in pconduit.GetSchemaResponse) *conduitv1.GetSchemaRespon
}
}

func CreateSchemaRequest(in pconduit.CreateSchemaRequest) *conduitv1.CreateSchemaRequest {
return &conduitv1.CreateSchemaRequest{
func CreateSchemaRequest(in pprocutils.CreateSchemaRequest) *procutilsv1.CreateSchemaRequest {
return &procutilsv1.CreateSchemaRequest{
Subject: in.Subject,
Type: schemav1.Schema_Type(in.Type),
Bytes: in.Bytes,
}
}

func CreateSchemaResponse(in pconduit.CreateSchemaResponse) *conduitv1.CreateSchemaResponse {
return &conduitv1.CreateSchemaResponse{
func CreateSchemaResponse(in pprocutils.CreateSchemaResponse) *procutilsv1.CreateSchemaResponse {
return &procutilsv1.CreateSchemaResponse{
Schema: &schemav1.Schema{
Subject: in.Schema.Subject,
Version: int32(in.Schema.Version),
Expand Down
Loading

0 comments on commit 7ce2390

Please sign in to comment.