Skip to content

Commit

Permalink
chore(refactor): Rearrange files (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
vrongmeal authored Jan 10, 2025
1 parent 96032d9 commit 4caab49
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 43 deletions.
20 changes: 0 additions & 20 deletions CONTRIBUTING.md

This file was deleted.

36 changes: 18 additions & 18 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ tasks:
- gen
cmds:
- |
git diff --exit-code pb/*.go s2/*.sync.go && echo "Up-to-date" || {
git diff --exit-code internal/pb/*.go s2/*.sync.go && echo "Up-to-date" || {
echo "Not up-to-date"
echo "Run task:gen and update the generated code"
exit 1
Expand Down Expand Up @@ -76,18 +76,18 @@ tasks:
sources:
- proto/s2/v1alpha/s2.proto
generates:
- pb/s2.pb.go
- pb/s2_grpc.pb.go
- internal/pb/s2.pb.go
- internal/pb/s2_grpc.pb.go
cmds:
- test -d pb || mkdir pb
- test -d internal/pb || mkdir -p internal/pb
- cmd: |
protoc --proto_path=proto/s2/v1alpha \
--go_opt=Ms2.proto=github.com/s2-streamstore/s2-sdk-go/pb \
--go-grpc_opt=Ms2.proto=github.com/s2-streamstore/s2-sdk-go/pb \
--go_opt=Ms2.proto=github.com/s2-streamstore/s2-sdk-go/internal/pb \
--go-grpc_opt=Ms2.proto=github.com/s2-streamstore/s2-sdk-go/internal/pb \
--go_opt=paths=source_relative \
--go-grpc_opt=paths=source_relative \
--go_out=pb \
--go-grpc_out=pb \
--go_out=internal/pb \
--go-grpc_out=internal/pb \
s2.proto
gen:sync:
Expand All @@ -101,15 +101,15 @@ tasks:
- gen:proto
sources:
- .out/sync-docs
- pb/s2.pb.go
- syncgen/types.sync.tmpl
- internal/pb/s2.pb.go
- s2/types.sync.tmpl
generates:
- s2/types.sync.go
cmds:
- cmd: |
.out/sync-docs \
-i pb/s2.pb.go \
-t syncgen/types.sync.tmpl \
-i internal/pb/s2.pb.go \
-t s2/types.sync.tmpl \
-o s2/types.sync.go
gen:sync:client:
Expand All @@ -118,21 +118,21 @@ tasks:
- gen:proto
sources:
- .out/sync-docs
- pb/s2_grpc.pb.go
- syncgen/client.sync.tmpl
- internal/pb/s2_grpc.pb.go
- s2/client.sync.tmpl
generates:
- s2/client.sync.go
cmds:
- cmd: |
.out/sync-docs \
-i pb/s2_grpc.pb.go \
-t syncgen/client.sync.tmpl \
-i internal/pb/s2_grpc.pb.go \
-t s2/client.sync.tmpl \
-o s2/client.sync.go
gen:sync:_bin:
sources:
- cmd/sync-docs/*.go
- internal/sync-docs/*.go
generates:
- .out/sync-docs
cmds:
- go build -o .out/sync-docs ./cmd/sync-docs/*.go
- go build -o .out/sync-docs ./internal/sync-docs/*.go
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion s2/account_service_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"github.com/google/uuid"
"github.com/s2-streamstore/s2-sdk-go/pb"
"github.com/s2-streamstore/s2-sdk-go/internal/pb"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/fieldmaskpb"
Expand Down
2 changes: 1 addition & 1 deletion s2/basin_service_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"github.com/google/uuid"
"github.com/s2-streamstore/s2-sdk-go/pb"
"github.com/s2-streamstore/s2-sdk-go/internal/pb"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/fieldmaskpb"
Expand Down
2 changes: 1 addition & 1 deletion s2/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

"github.com/google/uuid"
"github.com/s2-streamstore/s2-sdk-go/pb"
"github.com/s2-streamstore/s2-sdk-go/internal/pb"
"google.golang.org/grpc"
"google.golang.org/grpc/backoff"
"google.golang.org/grpc/credentials"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion s2/stream_service_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package s2
import (
"context"

"github.com/s2-streamstore/s2-sdk-go/pb"
"github.com/s2-streamstore/s2-sdk-go/internal/pb"
)

type checkTailServiceRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion s2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"math/rand/v2"
"time"

"github.com/s2-streamstore/s2-sdk-go/pb"
"github.com/s2-streamstore/s2-sdk-go/internal/pb"
)

const (
Expand Down
File renamed without changes.

0 comments on commit 4caab49

Please sign in to comment.