Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ client.Put(ctx, key, &task)
client.Get(ctx, key, &task)
```

**Supported:** Get, Put, Delete, GetMulti, PutMulti, DeleteMulti, RunInTransaction, AllKeys, NameKey, IDKey, parent keys.
**Supported:**
- **CRUD**: Get, Put, Delete, GetMulti, PutMulti, DeleteMulti
- **Transactions**: RunInTransaction, NewTransaction, Commit, Rollback
- **Queries**: Filter, Order, Limit, Offset, Ancestor, Project, Distinct, DistinctOn, Namespace, Run (iterator), Count
- **Cursors**: Start, End, DecodeCursor
- **Keys**: NameKey, IDKey, IncompleteKey, AllocateIDs, parent keys
- **Mutations**: NewInsert, NewUpdate, NewUpsert, NewDelete, Mutate
- **Types**: string, int, int64, int32, bool, float64, time.Time, slices ([]string, []int64, []int, []float64, []bool)

## Migrating from Official Client

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

## Limitations

Not supported: property filters, ordering, cursors, ancestor queries, slices/arrays, embedded structs, key allocation.
Not supported: embedded structs, nested slices, map types, some advanced query features (streaming aggregations, OR filters).

See [example/](example/) for usage. Apache 2.0 licensed.
18 changes: 9 additions & 9 deletions auth/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ func TestSetMetadataURL(t *testing.T) {

func TestAccessTokenFromMetadata(t *testing.T) {
tests := []struct {
name string
statusCode int
response any
wantErr bool
name string
wantToken string
errContains string
metadataFlavor string
statusCode int
wantErr bool
}{
{
name: "success",
Expand Down Expand Up @@ -214,12 +214,12 @@ func TestAccessTokenFromADC(t *testing.T) {
defer tokenServer.Close()

tests := []struct {
setupEnv func()
name string
credsData string
setupEnv func()
wantErr bool
errContains string
wantToken string
wantErr bool
}{
{
name: "success with valid credentials",
Expand Down Expand Up @@ -310,11 +310,11 @@ func TestAccessTokenFromADC(t *testing.T) {
func TestProjectID(t *testing.T) {
tests := []struct {
name string
statusCode int
response string
wantErr bool
wantProject string
errContains string
statusCode int
wantErr bool
}{
{
name: "success",
Expand Down Expand Up @@ -414,10 +414,10 @@ func TestProjectIDMetadataServerDown(t *testing.T) {
func TestExchangeRefreshTokenErrors(t *testing.T) {
tests := []struct {
name string
statusCode int
response string
wantErr bool
errContains string
statusCode int
wantErr bool
}{
{
name: "unauthorized",
Expand Down
Loading
Loading