Skip to content

Commit

Permalink
Switched to connectrpc.com/connect package import
Browse files Browse the repository at this point in the history
  • Loading branch information
oxisto committed Oct 9, 2023
1 parent 21fe0b4 commit 6b29c59
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ automatically built and and tested using GitHub Actions.
## Dependencies

We want to keep the amount of dependencies minimal. `golang/x` packages are fair
game, we need `github.com/bufbuild/connect-go` and `google.golang.org/protobuf`.
game, we need `connectrpc.com/connect` and `google.golang.org/protobuf`.
We also probably need some kind of assertion library for testing. For everything
else (logging, database) we stick to the Go standard library for now, however we
need to import an SQL driver, like `modernc.org/sqlite`.
2 changes: 1 addition & 1 deletion gen/portfoliov1connect/mgo.connect.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
Expand Up @@ -3,7 +3,7 @@ module github.com/oxisto/money-gopher
go 1.21

require (
github.com/bufbuild/connect-go v1.10.0
connectrpc.com/connect v1.10.1
github.com/mattn/go-sqlite3 v1.14.17
github.com/oxisto/assert v0.0.6
golang.org/x/net v0.16.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/bufbuild/connect-go v1.10.0 h1:QAJ3G9A1OYQW2Jbk3DeoJbkCxuKArrvZgDt47mjdTbg=
github.com/bufbuild/connect-go v1.10.0/go.mod h1:CAIePUgkDR5pAFaylSMtNK45ANQjp9JvpluG20rhpV8=
connectrpc.com/connect v1.10.1 h1:vnoz6AZnSIu8/SGU6458VtrFZFhkEZTqn6xgAzMS5og=
connectrpc.com/connect v1.10.1/go.mod h1:ARfc9N8ifAehhTXIVUG5effZoJ5DG9ATm6/x6kVhvP8=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
Expand Down
2 changes: 1 addition & 1 deletion repl/commands/portfolio.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/oxisto/money-gopher/gen/portfoliov1connect"
"github.com/oxisto/money-gopher/repl"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"google.golang.org/protobuf/types/known/timestamppb"
)

Expand Down
2 changes: 1 addition & 1 deletion repl/commands/securities.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"log"
"net/http"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
portfoliov1 "github.com/oxisto/money-gopher/gen"
"github.com/oxisto/money-gopher/gen/portfoliov1connect"
"github.com/oxisto/money-gopher/repl"
Expand Down
2 changes: 1 addition & 1 deletion service/internal/crud/crud_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package crud
import (
"github.com/oxisto/money-gopher/persistence"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"google.golang.org/protobuf/types/known/emptypb"
)

Expand Down
2 changes: 1 addition & 1 deletion service/internal/crud/crud_requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"reflect"
"testing"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/oxisto/assert"
portfoliov1 "github.com/oxisto/money-gopher/gen"
"github.com/oxisto/money-gopher/internal"
Expand Down
2 changes: 1 addition & 1 deletion service/portfolio/portfolio.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/oxisto/money-gopher/service/internal/crud"
"google.golang.org/protobuf/types/known/emptypb"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
)

var portfolioSetter = func(obj *portfoliov1.Portfolio) *portfoliov1.Portfolio {
Expand Down
2 changes: 1 addition & 1 deletion service/portfolio/portfolio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"testing"
"time"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/oxisto/assert"
portfoliov1 "github.com/oxisto/money-gopher/gen"
"github.com/oxisto/money-gopher/gen/portfoliov1connect"
Expand Down
2 changes: 1 addition & 1 deletion service/portfolio/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/oxisto/money-gopher/finance"
portfoliov1 "github.com/oxisto/money-gopher/gen"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"google.golang.org/protobuf/types/known/timestamppb"
)

Expand Down
2 changes: 1 addition & 1 deletion service/portfolio/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"google.golang.org/protobuf/types/known/emptypb"
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
)

var mockSecuritiesClientWithData = &mockSecuritiesClient{
Expand Down
2 changes: 1 addition & 1 deletion service/portfolio/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/oxisto/money-gopher/import/csv"
"github.com/oxisto/money-gopher/service/internal/crud"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"google.golang.org/protobuf/types/known/emptypb"
)

Expand Down
2 changes: 1 addition & 1 deletion service/portfolio/transactions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"testing"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/oxisto/assert"
portfoliov1 "github.com/oxisto/money-gopher/gen"
"github.com/oxisto/money-gopher/gen/portfoliov1connect"
Expand Down
2 changes: 1 addition & 1 deletion service/securities/quote.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
portfoliov1 "github.com/oxisto/money-gopher/gen"
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
)

func (svc *service) TriggerSecurityQuoteUpdate(ctx context.Context, req *connect.Request[portfoliov1.TriggerQuoteUpdateRequest]) (res *connect.Response[portfoliov1.TriggerQuoteUpdateResponse], err error) {
Expand Down
2 changes: 1 addition & 1 deletion service/securities/quote_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"testing"
"time"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/oxisto/assert"
portfoliov1 "github.com/oxisto/money-gopher/gen"
"github.com/oxisto/money-gopher/internal"
Expand Down
2 changes: 1 addition & 1 deletion service/securities/securities.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
portfoliov1 "github.com/oxisto/money-gopher/gen"
"github.com/oxisto/money-gopher/service/internal/crud"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"google.golang.org/protobuf/types/known/emptypb"
)

Expand Down
2 changes: 1 addition & 1 deletion service/securities/securities_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"testing"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/oxisto/assert"
portfoliov1 "github.com/oxisto/money-gopher/gen"
"github.com/oxisto/money-gopher/gen/portfoliov1connect"
Expand Down

0 comments on commit 6b29c59

Please sign in to comment.