Skip to content

Commit e78ae3a

Browse files
Thomas StrombergThomas Stromberg
authored andcommitted
Add more compatability with DataStore features
1 parent 8c56ad2 commit e78ae3a

File tree

5 files changed

+592
-64
lines changed

5 files changed

+592
-64
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ client.Put(ctx, key, &task)
2121
client.Get(ctx, key, &task)
2222
```
2323

24-
**Supported:** Get, Put, Delete, GetMulti, PutMulti, DeleteMulti, RunInTransaction, AllKeys, NameKey, IDKey, parent keys.
24+
**Supported:** Get, Put, Delete, GetMulti, PutMulti, DeleteMulti, RunInTransaction, NewTransaction, Commit, Rollback, AllKeys, Query (Filter, Order, Offset, Ancestor, Project), NameKey, IDKey, IncompleteKey, parent keys.
2525

2626
## Migrating from Official Client
2727

@@ -35,6 +35,6 @@ Use `ds9mock` package for in-memory testing. See [TESTING.md](TESTING.md) for in
3535

3636
## Limitations
3737

38-
Not supported: property filters, ordering, cursors, ancestor queries, slices/arrays, embedded structs, key allocation.
38+
Not supported: cursors, slices/arrays, embedded structs, automatic key allocation, some advanced query features.
3939

4040
See [example/](example/) for usage. Apache 2.0 licensed.

auth/auth_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ func TestSetMetadataURL(t *testing.T) {
4141

4242
func TestAccessTokenFromMetadata(t *testing.T) {
4343
tests := []struct {
44-
name string
45-
statusCode int
4644
response any
47-
wantErr bool
45+
name string
4846
wantToken string
4947
errContains string
5048
metadataFlavor string
49+
statusCode int
50+
wantErr bool
5151
}{
5252
{
5353
name: "success",
@@ -214,12 +214,12 @@ func TestAccessTokenFromADC(t *testing.T) {
214214
defer tokenServer.Close()
215215

216216
tests := []struct {
217+
setupEnv func()
217218
name string
218219
credsData string
219-
setupEnv func()
220-
wantErr bool
221220
errContains string
222221
wantToken string
222+
wantErr bool
223223
}{
224224
{
225225
name: "success with valid credentials",
@@ -310,11 +310,11 @@ func TestAccessTokenFromADC(t *testing.T) {
310310
func TestProjectID(t *testing.T) {
311311
tests := []struct {
312312
name string
313-
statusCode int
314313
response string
315-
wantErr bool
316314
wantProject string
317315
errContains string
316+
statusCode int
317+
wantErr bool
318318
}{
319319
{
320320
name: "success",
@@ -414,10 +414,10 @@ func TestProjectIDMetadataServerDown(t *testing.T) {
414414
func TestExchangeRefreshTokenErrors(t *testing.T) {
415415
tests := []struct {
416416
name string
417-
statusCode int
418417
response string
419-
wantErr bool
420418
errContains string
419+
statusCode int
420+
wantErr bool
421421
}{
422422
{
423423
name: "unauthorized",

0 commit comments

Comments
 (0)