Commit Graph

26 Commits

Author SHA1 Message Date
mikeee abe2f81af3
fix: update StateConsistency type to match protobufs (#481)
* fix: correct state consistency types

Signed-off-by: mikeee <hey@mike.ee>

* fix: add tests to type conversions

Signed-off-by: mikeee <hey@mike.ee>

---------

Signed-off-by: mikeee <hey@mike.ee>
2024-01-19 08:52:10 -08:00
mikeee 04f7b595b6
feat: go1.20 and golangci-lint v1.55.2 (#480)
* fix: remove invalid 'unused' config and fix wsl trailing whitespace key name

Signed-off-by: mikeee <hey@mike.ee>

* fix: disable inamedparam linter

Signed-off-by: mikeee <hey@mike.ee>

* fix: update package and tool to go1.21.5

Signed-off-by: mikeee <hey@mike.ee>

* fix: correct majority of the testifylinter issues relating to error assertions

Signed-off-by: mikeee <hey@mike.ee>

* fix: reverse actual and expected values

Signed-off-by: mikeee <hey@mike.ee>

* fix: correct test cases

Signed-off-by: mikeee <hey@mike.ee>

* fix: correct misspell - upsert

Signed-off-by: mikeee <hey@mike.ee>

* fix: add missing import

Signed-off-by: mikeee <hey@mike.ee>

* update: bump validation workflow to 1.21

Signed-off-by: mikeee <hey@mike.ee>

* fix: refactor direct access references to proto fields

Signed-off-by: mikeee <hey@mike.ee>

* fix: revert to go1.20 retaining version-1 support

Signed-off-by: mikeee <hey@mike.ee>

* fix: update test-dapr-bot workflow golangci-lint ver to 1.55.2

Signed-off-by: mikeee <hey@mike.ee>

* fix: fix assertions for dapr-bot and check-lint-version

Signed-off-by: mikeee <hey@mike.ee>

* fix: remove length function call

Signed-off-by: mikeee <hey@mike.ee>

* fix: fix StateConsistency logic and add tests to satisfy codecov

Signed-off-by: mikeee <hey@mike.ee>

* tests: add coverage of empty store names for delete bulk state item method

Signed-off-by: mikeee <hey@mike.ee>

---------

Signed-off-by: mikeee <hey@mike.ee>
2023-12-11 10:51:26 +08:00
Mike 5779353f7a
migrate protos (#439)
* remove clean command for protos

Signed-off-by: mikeee <hey@mike.ee>

* delete internal protos

Signed-off-by: mikeee <hey@mike.ee>

* migrate refs to 1.11.1-rc.2

Signed-off-by: mikeee <hey@mike.ee>

* migrate metadata pb import

Signed-off-by: mikeee <hey@mike.ee>

* bump imports (dapr 1.12.0-rc.4)

Signed-off-by: mikeee <hey@mike.ee>

* fix wait test to allow more than one "client"

Signed-off-by: mikeee <hey@mike.ee>

---------

Signed-off-by: mikeee <hey@mike.ee>
2023-09-26 09:20:08 -07:00
yellow chicks f182441168
feature(apphealth&configuration): add app health check & adapt new configuration API (#323)
* fix/typo: modify state  annotation

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(apphealth): add app health check

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(apphealth): add app health check

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(apphealth): add app health check

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(apphealth): add app health check

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(apphealth): add app health check

Signed-off-by: 1046102779 <seachen@tencent.com>

Signed-off-by: 1046102779 <seachen@tencent.com>
2022-09-30 15:19:16 -07:00
mikeb26 c89770a473
Add SaveStateWithETag() convenience function (#321)
In the state API there's an existing DeleteStateWithETag() convenience
function but there does not appear to be an equivalent
SaveStateWithETag(). This commit adds SetStateWithETag() so that
consumers of the SDK don't have to employ the more verbose
SaveBulkState() when they only need to update a singular item.

Client code updating a single item with an etag prior to this commit
looks like:

--
item := &dapr.SetStateItem{
	Etag: &dapr.ETag{
		Value: "deadbeef",
	},
	Key:   "order_1",
	Value: []byte(data),
}

err := client.SaveBulkState(ctx, store, item)
--

Client code after this commit can reduce to:

--
err := client.SaveStateWithEtag(ctx, store, "order_1", []byte(data), "deadbeef")
--

Signed-off-by: Mike Brown <github@torvosoft.com>

Signed-off-by: Mike Brown <github@torvosoft.com>
2022-09-28 09:47:33 -07:00
Dmitry Shmulevich 9944bfebcc
update query test (#263)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2022-03-25 09:17:09 -07:00
Dmitry Shmulevich a0a4a9e70a
allow passage of metadata to state store API (#262)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2022-02-24 09:39:05 +08:00
Dmitry Shmulevich a38be4e38b
replace license headers (#232)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2021-12-14 12:06:12 -08:00
Dmitry Shmulevich 15fc672e08
add support for state query API (#216)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2021-12-08 10:27:52 +08:00
Phil Kedy de68193d5c
Use proto packages that exist in dapr/dapr instead of generating them locally in the SDK. This enables the ability to embed Dapr and also use the SDK to interact with the Dapr APIs. Also moved go mod to 1.17. (#211) 2021-10-17 11:23:06 +08:00
Long Dai de5cf935fb
ci: standard linter config (#199)
Signed-off-by: Long <long0dai@foxmail.com>
2021-09-22 11:02:52 -07:00
Sky/敖小剑 22f00ec23f
add bulk delete state method in client sdk (#139) 2021-02-09 13:55:34 -08:00
Yaron Schneider b972d70edc
add support for etag and bulk secret modifications (#135) 2021-01-25 18:37:46 -08:00
Sky/敖小剑 32dbe98dc7
support metadata in state bulk get state (#114)
* update GetBulkState method: add metedata, change return struct to BulkStateItem

* generate code from dapr proto files; support metadata in get response

* update for code review
2020-12-07 05:33:47 -08:00
Sky/敖小剑 309bf13bbe
rename SaveStateItems() to SaveBulkState(); rename GetStateItems() to GetBulkState(); (#105) 2020-11-11 05:27:19 -08:00
Mark Chmarny 0a93facbba
mchmarny coverage config (#99)
* options

* service, topic test

* binding, invoke, topic tests

* split coveage on projects

* cleaned up test

* cleaned up release test

* badge to main vs master

* madditional trace ID test

* adds secret input test

* state tests and lint
2020-10-29 10:00:15 -07:00
Sky/敖小剑 7e20fe99ea
add meta in state delete api (#82)
* add meta in state delete api

* add testcase for state delete, also cover all the get/save/delete method with meta and options
2020-09-29 03:31:41 -07:00
Mark Chmarny c368bf0455
issue 62 metadata in get state operation (#65) 2020-09-17 16:12:47 -07:00
Mark Chmarny 4ef06bf388
test for serialization issues with transaction upsert (#71)
* bulk save test

* upsert test

* spelling
2020-09-10 08:54:56 -07:00
Mark Chmarny 3b57737ad8
bulk get, transaction exec support (#47)
* bulk get #46, transaction exrc

* updated examples

* ntis from PR review

* fixes lint errors

* mod tidied
2020-08-17 08:08:05 -07:00
Mark Chmarny eddc378eb0
gRPC serving implementation addressing #26 (#27)
* WIP: server

* gRPC server implementaiton

* http serving

* grpc ports as string vs int

* bump tag

* adds ctx, fixes linting errors

* v0.8.2 bump

* fixes serving options

* cleans up cloud events in gttp serving

* v0.8.4 version bump

* uses http method constant

* adds grpc serving tests

* pubsub evnet as bytes

* adds tests, seperate payload between http, grpc

* refactored names, tests

* fixes release names

* fixes versoin number

* http invoke test, grpc invoke params

* makefile updates

* readme updates, fixes grpc to http invocations

* readme updates

* comments, refactored http service

* more serving tests

* more client tests

* test verbocity

* fixes grpc error serializtion error

* adds serving to readme

* code formatting

* adds support for TypeUrl in case of a proto conten

* added binding in http service

* cron in grpc example

* single interface for grpc and http sdks

* normalized serving interfaces across http and grpc

* unit, rest api tests for grpc, html serving

* updated tests

* resolved master conflicts

* changes from @youngbupark review

* overloaded AddTopicEventHandler for ease of use

* updated to go 1.15, dependancies

* updated actions to go 1.15

* service test coverage

* readme and release version updates

* makefile flag options for dapr v0.9

* serving to grpc package for ease of http imp
2020-08-12 13:00:32 -07:00
Mark Chmarny 3bd9a9afde
Removes retry options from state apis (#39) 2020-08-11 06:28:17 -07:00
Mark Chmarny 335a86ac3e
TestMain, test coverage (#24) 2020-06-24 09:39:26 -07:00
Mark Chmarny c9110e404a client interface, test client errs 2020-06-22 07:54:32 -07:00
Mark Chmarny 39af2eba1e tests infra, naive tests implemented 2020-06-18 06:29:04 -07:00
Mark Chmarny 5b5c0f23d8 WIP: state methods no longer leak proto types 2020-06-16 08:45:55 -07:00