Skip to content
This repository was archived by the owner on Jun 18, 2025. It is now read-only.

Commit c72843d

Browse files
committed
Rebrand codebase.
1 parent ad440e5 commit c72843d

65 files changed

Lines changed: 944 additions & 945 deletions

Some content is hidden

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

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ endif
3535

3636
.PHONY: singleNode
3737
singleNode: ## Run tests against a single node.
38-
@EVENTSTORE_INSECURE=true go test -count=1 -v ./esdb -run 'TestStreams|TestPersistentSubscriptions|TestExpectations|TestProjections'
38+
@EVENTSTORE_INSECURE=true go test -count=1 -v ./kurrent -run 'TestStreams|TestPersistentSubscriptions|TestExpectations|TestProjections'
3939

4040
.PHONY: secureNode
4141
secureNode: ## Run tests against a secure node.
4242
@$(DOCKER_COMPOSE_CMD) down -v
4343
@$(DOCKER_COMPOSE_CMD) pull
4444
@$(DOCKER_COMPOSE_CMD) up -d
45-
@EVENTSTORE_INSECURE=false go test -v ./esdb -run 'TestStreams|TestPersistentSubscriptions|TestProjections'
45+
@EVENTSTORE_INSECURE=false go test -v ./kurrent -run 'TestStreams|TestPersistentSubscriptions|TestProjections'
4646
@$(DOCKER_COMPOSE_CMD) down
4747

4848
.PHONY: clusterNode
@@ -52,16 +52,16 @@ clusterNode: ## Run tests against a cluster node.
5252
@$(DOCKER_COMPOSE_CMD) -f cluster-docker-compose.yml up -d
5353
@echo "Waiting for services to be fully ready..."
5454
@sleep 5
55-
@EVENTSTORE_INSECURE=false CLUSTER=true go test -count=1 -v ./esdb -run 'TestStreams|TestPersistentSubscriptions|TestProjections|TestClusterRebalance'
55+
@EVENTSTORE_INSECURE=false CLUSTER=true go test -count=1 -v ./kurrent -run 'TestStreams|TestPersistentSubscriptions|TestProjections|TestClusterRebalance'
5656
@$(DOCKER_COMPOSE_CMD) -f cluster-docker-compose.yml down --remove-orphans
5757

5858
.PHONY: misc
5959
misc: ## Run tests that don't need a server to run.
60-
go test -v ./esdb -run TestMisc
60+
go test -v ./kurrent -run TestMisc
6161

6262
.PHONY: test
6363
test: singleNode secureNode clusterNode misc ## Run all tests.
6464

6565
.PHONY: ci
6666
ci: ## Run tests in Github Actions setting.
67-
go test -v ./esdb -run "$(CI_TARGET)"
67+
go test -v ./kurrent -run "$(CI_TARGET)"

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# EventStoreDB Client SDK for Golang [![Actions Status](https://github.com/eventstore/EventStore-Client-Go/workflows/CI/badge.svg?branch=master)](https://github.com/eventstore/EventStore-Client-Go/actions)
1+
# KurrentDB Client SDK for Golang [![Actions Status](https://github.com/eventstore/EventStore-Client-Go/workflows/CI/badge.svg?branch=master)](https://github.com/eventstore/EventStore-Client-Go/actions)
22

3-
EventStoreDB is the event-native database, where business events are immutably stored and streamed. Designed for event-sourced, event-driven, and microservices architectures.
3+
KurrentDB is the event-native database, where business events are immutably stored and streamed. Designed for event-sourced, event-driven, and microservices architectures.
44

5-
This repository contains an [EventStoreDB][es] Client SDK written in Go.
5+
This repository contains an [KurrentDB][kurrent] Client SDK written in Go.
66

77
## Developing
88

9-
Integration tests run against a server using Docker, with the [EventStoreDB gRPC Client Test Container][container].
9+
Integration tests run against a server using Docker, with the [KurrentDB gRPC Client Test Container][container].
1010

1111
### Setup dependencies
1212
Testing requires [Docker] and [Docker Compose] to be installed.
@@ -42,7 +42,7 @@ make test
4242
## Communities
4343

4444
- [Discuss](https://discuss.eventstore.com/)
45-
- [Discord (Event Store)](https://discord.gg/Phn9pmCw3t)
45+
- [Discord (Kurrent)](https://discord.gg/Phn9pmCw3t)
4646

4747
## Security
4848

@@ -58,5 +58,5 @@ All contributions to the SDK are made via GitHub Pull Requests, and must be lice
5858
[docker]: https://www.docker.com/
5959
[docker compose]: https://www.docker.com/
6060

61-
[es]: https://eventstore.com
61+
[kurrent]: https://kurrent.io
6262
[make]: https://www.gnu.org/software/make/

build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ if ($generateProtos) {
6363
}
6464

6565
Write-Host "Compiling project..."
66-
go build -v .\esdb .\samples
66+
go build -v .\kurrent .\samples
6767
Write-Host "done."

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,5 @@ then
7171
fi
7272

7373
echo "Compiling project..."
74-
go build -v ./esdb ./samples
74+
go build -v ./kurrent ./samples
7575
echo "done."

esdb/position_parsing_test.go

Lines changed: 0 additions & 46 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package esdb
1+
package kurrent
22

33
import (
44
"time"
Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package esdb_test
1+
package kurrent_test
22

33
import (
44
"context"
@@ -8,14 +8,14 @@ import (
88
"testing"
99
"time"
1010

11-
"github.com/EventStore/EventStore-Client-Go/v4/esdb"
11+
"github.com/EventStore/EventStore-Client-Go/v4/kurrent"
1212
"github.com/stretchr/testify/assert"
1313
)
1414

15-
func createTestEvent() esdb.EventData {
16-
event := esdb.EventData{
15+
func createTestEvent() kurrent.EventData {
16+
event := kurrent.EventData{
1717
EventType: "TestEvent",
18-
ContentType: esdb.ContentTypeBinary,
18+
ContentType: kurrent.ContentTypeBinary,
1919
EventID: uuid.New(),
2020
Data: []byte{0xb, 0xe, 0xe, 0xf},
2121
Metadata: []byte{0xd, 0xe, 0xa, 0xd},
@@ -24,8 +24,8 @@ func createTestEvent() esdb.EventData {
2424
return event
2525
}
2626

27-
func collectStreamEvents(stream *esdb.ReadStream) ([]*esdb.ResolvedEvent, error) {
28-
events := []*esdb.ResolvedEvent{}
27+
func collectStreamEvents(stream *kurrent.ReadStream) ([]*kurrent.ResolvedEvent, error) {
28+
events := []*kurrent.ResolvedEvent{}
2929

3030
for {
3131
event, err := stream.Recv()
@@ -45,7 +45,7 @@ func collectStreamEvents(stream *esdb.ReadStream) ([]*esdb.ResolvedEvent, error)
4545

4646
type TestCall = func(t *testing.T)
4747

48-
func AppendTests(t *testing.T, emptyDB *Container, emptyDBClient *esdb.Client) {
48+
func AppendTests(t *testing.T, emptyDB *Container, emptyDBClient *kurrent.Client) {
4949
t.Run("AppendTests", func(t *testing.T) {
5050
t.Run("appendToStreamSingleEventNoStream", appendToStreamSingleEventNoStream(emptyDBClient))
5151
t.Run("appendWithInvalidStreamRevision", appendWithInvalidStreamRevision(emptyDBClient))
@@ -54,7 +54,7 @@ func AppendTests(t *testing.T, emptyDB *Container, emptyDBClient *esdb.Client) {
5454
})
5555
}
5656

57-
func appendToStreamSingleEventNoStream(db *esdb.Client) TestCall {
57+
func appendToStreamSingleEventNoStream(db *kurrent.Client) TestCall {
5858
return func(t *testing.T) {
5959
testEvent := createTestEvent()
6060
testEvent.EventID = uuid.MustParse("38fffbc2-339e-11ea-8c7b-784f43837872")
@@ -63,8 +63,8 @@ func appendToStreamSingleEventNoStream(db *esdb.Client) TestCall {
6363
context, cancel := context.WithTimeout(context.Background(), time.Duration(5)*time.Second)
6464
defer cancel()
6565

66-
opts := esdb.AppendToStreamOptions{
67-
ExpectedRevision: esdb.NoStream{},
66+
opts := kurrent.AppendToStreamOptions{
67+
ExpectedRevision: kurrent.NoStream{},
6868
}
6969

7070
_, err := db.AppendToStream(context, streamID.String(), opts, testEvent)
@@ -73,7 +73,7 @@ func appendToStreamSingleEventNoStream(db *esdb.Client) TestCall {
7373
t.Fatalf("Unexpected failure %+v", err)
7474
}
7575

76-
stream, err := db.ReadStream(context, streamID.String(), esdb.ReadStreamOptions{}, 1)
76+
stream, err := db.ReadStream(context, streamID.String(), kurrent.ReadStreamOptions{}, 1)
7777

7878
if err != nil {
7979
t.Fatalf("Unexpected failure %+v", err)
@@ -96,20 +96,20 @@ func appendToStreamSingleEventNoStream(db *esdb.Client) TestCall {
9696
}
9797
}
9898

99-
func appendWithInvalidStreamRevision(db *esdb.Client) TestCall {
99+
func appendWithInvalidStreamRevision(db *kurrent.Client) TestCall {
100100
return func(t *testing.T) {
101101
streamID := uuid.New()
102102
context, cancel := context.WithTimeout(context.Background(), time.Duration(5)*time.Second)
103103
defer cancel()
104104

105-
opts := esdb.AppendToStreamOptions{
106-
ExpectedRevision: esdb.StreamExists{},
105+
opts := kurrent.AppendToStreamOptions{
106+
ExpectedRevision: kurrent.StreamExists{},
107107
}
108108

109109
_, err := db.AppendToStream(context, streamID.String(), opts, createTestEvent())
110-
esdbErr, ok := esdb.FromError(err)
110+
esdbErr, ok := kurrent.FromError(err)
111111
assert.False(t, ok)
112-
assert.Equal(t, esdbErr.Code(), esdb.ErrorCodeWrongExpectedVersion)
112+
assert.Equal(t, esdbErr.Code(), kurrent.ErrorCodeWrongExpectedVersion)
113113
}
114114
}
115115

@@ -122,12 +122,12 @@ func appendToSystemStreamWithIncorrectCredentials(container *Container) TestCall
122122
}
123123

124124
conn := fmt.Sprintf("esdb://bad_user:bad_password@%s?tlsverifycert=false", container.Endpoint)
125-
config, err := esdb.ParseConnectionString(conn)
125+
config, err := kurrent.ParseConnectionString(conn)
126126
if err != nil {
127127
t.Fatalf("Unexpected configuration error: %s", err.Error())
128128
}
129129

130-
db, err := esdb.NewClient(config)
130+
db, err := kurrent.NewClient(config)
131131
if err != nil {
132132
t.Fatalf("Unexpected failure setting up test connection: %s", err.Error())
133133
}
@@ -138,35 +138,35 @@ func appendToSystemStreamWithIncorrectCredentials(container *Container) TestCall
138138
context, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
139139
defer cancel()
140140

141-
opts := esdb.AppendToStreamOptions{
142-
ExpectedRevision: esdb.Any{},
141+
opts := kurrent.AppendToStreamOptions{
142+
ExpectedRevision: kurrent.Any{},
143143
}
144144

145145
_, err = db.AppendToStream(context, streamID.String(), opts, createTestEvent())
146-
esdbErr, ok := esdb.FromError(err)
146+
esdbErr, ok := kurrent.FromError(err)
147147
assert.False(t, ok)
148-
assert.Equal(t, esdbErr.Code(), esdb.ErrorCodeUnauthenticated)
148+
assert.Equal(t, esdbErr.Code(), kurrent.ErrorCodeUnauthenticated)
149149
}
150150
}
151151

152-
func metadataOperation(db *esdb.Client) TestCall {
152+
func metadataOperation(db *kurrent.Client) TestCall {
153153
return func(t *testing.T) {
154154
streamID := uuid.New()
155155
context, cancel := context.WithTimeout(context.Background(), time.Duration(5)*time.Second)
156156
defer cancel()
157157

158-
opts := esdb.AppendToStreamOptions{
159-
ExpectedRevision: esdb.Any{},
158+
opts := kurrent.AppendToStreamOptions{
159+
ExpectedRevision: kurrent.Any{},
160160
}
161161

162162
_, err := db.AppendToStream(context, streamID.String(), opts, createTestEvent())
163163

164164
assert.Nil(t, err, "error when writing an event")
165165

166-
acl := esdb.Acl{}
166+
acl := kurrent.Acl{}
167167
acl.AddReadRoles("admin")
168168

169-
meta := esdb.StreamMetadata{}
169+
meta := kurrent.StreamMetadata{}
170170
meta.SetMaxAge(2 * time.Second)
171171
meta.SetAcl(acl)
172172

@@ -175,7 +175,7 @@ func metadataOperation(db *esdb.Client) TestCall {
175175
assert.Nil(t, err, "no error from writing stream metadata")
176176
assert.NotNil(t, result, "defined write result after writing metadata")
177177

178-
metaActual, err := db.GetStreamMetadata(context, streamID.String(), esdb.ReadStreamOptions{})
178+
metaActual, err := db.GetStreamMetadata(context, streamID.String(), kurrent.ReadStreamOptions{})
179179

180180
assert.Nil(t, err, "no error when reading stream metadata")
181181

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,39 @@
1-
package esdb_test
1+
package kurrent_test
22

33
import (
44
"context"
5+
"github.com/EventStore/EventStore-Client-Go/v4/kurrent"
56
"testing"
67
"time"
7-
8-
"github.com/EventStore/EventStore-Client-Go/v4/esdb"
98
)
109

11-
func InsecureAuthenticationTests(t *testing.T, client *esdb.Client) {
10+
func InsecureAuthenticationTests(t *testing.T, client *kurrent.Client) {
1211
t.Run("AuthenticationTests", func(t *testing.T) {
1312
t.Run("callInsecureWithoutCredentials", callInsecureWithoutCredentials(client))
1413
t.Run("callInsecureWithInvalidCredentials", callInsecureWithInvalidCredentials(client))
1514
})
1615
}
1716

18-
func callInsecureWithoutCredentials(db *esdb.Client) TestCall {
17+
func callInsecureWithoutCredentials(db *kurrent.Client) TestCall {
1918
return func(t *testing.T) {
2019
context, cancel := context.WithTimeout(context.Background(), time.Duration(5)*time.Second)
2120
defer cancel()
2221

23-
err := db.CreatePersistentSubscription(context, NAME_GENERATOR.Generate(), NAME_GENERATOR.Generate(), esdb.PersistentStreamSubscriptionOptions{})
22+
err := db.CreatePersistentSubscription(context, NAME_GENERATOR.Generate(), NAME_GENERATOR.Generate(), kurrent.PersistentStreamSubscriptionOptions{})
2423

2524
if err != nil {
2625
t.Fatalf("Unexpected failure %+v", err)
2726
}
2827
}
2928
}
3029

31-
func callInsecureWithInvalidCredentials(db *esdb.Client) TestCall {
30+
func callInsecureWithInvalidCredentials(db *kurrent.Client) TestCall {
3231
return func(t *testing.T) {
3332
context, cancel := context.WithTimeout(context.Background(), time.Duration(5)*time.Second)
3433
defer cancel()
3534

36-
opts := esdb.PersistentStreamSubscriptionOptions{
37-
Authenticated: &esdb.Credentials{
35+
opts := kurrent.PersistentStreamSubscriptionOptions{
36+
Authenticated: &kurrent.Credentials{
3837
Login: "invalid",
3938
Password: "invalid",
4039
},

0 commit comments

Comments
 (0)