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
At the moment args are just assumed to be the correct type and asserted without checks. This causes panics.
Create a new BindingArg type that contains:
Required flag: whether the arg is required by Binding.Execute
Type: the reflect.Type of the arg
Add a method to the Binding interface that returns a list of BindingArgs. This should have a default implementation on bindingProto that just returns an empty list
Whenever bindingProto.Execute should check the args by calling the new method described above. If there are no BindingArgs returned then the args should be passed to bindingProto.Request and bindingProto.Response as is. If there are BindingArgs returned then we should check each provided argument for that type. If a provided arg does not have the correct type we will return an appropriate error
Monday.com Item ID: #4086140643
The text was updated successfully, but these errors were encountered:
- Made the Binding interface chainable and started the argument type checking with the new BindingParam type and Params() interface method #24 (09/03/2023 - 11:52:58)
- Added type checks to bindingProto.Execute #24 (09/03/2023 - 13:39:05)
- Added a way of defining BindingParams for interface values that will also be type checked by bindingProto.TypeCheckArgs #24 (10/03/2023 - 16:28:50)
- Added the api.Params function that can construct a list of BindingParams from a list of argument groupings (10/03/2023 - 16:43:24)
- Updated all the Bindings created via derivatives of the NewBinding method to set the Params method of their respective Bindings (10/03/2023 - 16:44:37)
- Added an example for the Params function (10/03/2023 - 16:44:56)
- Added a test for the Params function (10/03/2023 - 16:45:22)
- Added a test for the bindingProto.TypeCheckArgs (10/03/2023 - 16:45:39)
- Added some more fields to the BindingProto struct to aid with interface checking (10/03/2023 - 16:46:11)
- I may have gone a bit overboard with the api package... (10/03/2023 - 16:48:39)
- Moved everything to do with paginators, bindings, and params in api to their own files to tidy things up a bit (10/03/2023 - 16:56:31)
- Updated top binding for the reddit API (10/03/2023 - 18:50:55)
- Added a lot more types to the reddit API types.go file. The listingWrapper probably needs more fleshing out #2 (10/03/2023 - 18:51:38)
- Added the Binding.ArgsFromStrings interface method and implementation (10/03/2023 - 18:53:12)
At the moment args are just assumed to be the correct type and asserted without checks. This causes panics.
BindingArg
type that contains:Binding.Execute
reflect.Type
of the argBinding
interface that returns a list ofBindingArg
s. This should have a default implementation onbindingProto
that just returns an empty listbindingProto.Execute
should check the args by calling the new method described above. If there are noBindingArg
s returned then the args should be passed tobindingProto.Request
andbindingProto.Response
as is. If there areBindingArg
s returned then we should check each provided argument for that type. If a provided arg does not have the correct type we will return an appropriate errorMonday.com Item ID: #4086140643
The text was updated successfully, but these errors were encountered: