You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: HISTORY.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ Developers are not forced to upgrade if they don't really need it. Upgrade whene
23
23
24
24
Changes apply to `main` branch.
25
25
26
+
- Add `x/errors.List` package-level function to support `ListObjects(ctx context.Context, opts pagination.ListOptions, f Filter) ([]Object, int64, error)` type of service calls.
26
27
- Simplify how validation errors on `/x/errors` package works. A new `x/errors/validation` sub-package added to make your life easier (using the powerful Generics feature).
27
28
- Add `x/errors.OK`, `Create`, `NoContent` and `NoContentOrNotModified` package-level generic functions as custom service method caller helpers. Example can be found [here](_examples/routing/http-wire-errors/service/main.go).
28
29
- Add `x/errors.ReadPayload`, `ReadQuery`, `ReadPaginationOptions`, `Handle`, `HandleCreate`, `HandleCreateResponse`, `HandleUpdate` and `HandleDelete` package-level functions as helpers for common actions.
@@ -167,7 +175,31 @@ func (s *myService) List(ctx context.Context, in ListRequest) ([]CreateResponse,
167
175
},
168
176
}
169
177
170
-
returnresp, nil//, errors.New("list: test error")
178
+
returnresp, nil//, errors.New("list all: test error")
179
+
}
180
+
181
+
typeListFilterstruct {
182
+
Firstnamestring`json:"firstname"`
183
+
}
184
+
185
+
func (s*myService) ListPaginated(ctx context.Context, opts pagination.ListOptions, filterListFilter) ([]CreateResponse, int/* any number type */, error) {
0 commit comments