Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: accept trigger error and run state from endpoint (#3335)
- Loading branch information
1 parent
d2ec14f
commit 6bb9e63
Showing
8 changed files
with
360 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* TraceTest | ||
* | ||
* OpenAPI definition for TraceTest endpoint and resources | ||
* | ||
* API version: 0.2.1 | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package openapi | ||
|
||
type TriggerError struct { | ||
ConnectionError bool `json:"connectionError,omitempty"` | ||
|
||
RunningOnContainer bool `json:"runningOnContainer,omitempty"` | ||
|
||
TargetsLocalhost bool `json:"targetsLocalhost,omitempty"` | ||
|
||
Message string `json:"message,omitempty"` | ||
} | ||
|
||
// AssertTriggerErrorRequired checks if the required fields are not zero-ed | ||
func AssertTriggerErrorRequired(obj TriggerError) error { | ||
return nil | ||
} | ||
|
||
// AssertRecurseTriggerErrorRequired recursively checks if required fields are not zero-ed in a nested slice. | ||
// Accepts only nested slice of TriggerError (e.g. [][]TriggerError), otherwise ErrTypeAssertionError is thrown. | ||
func AssertRecurseTriggerErrorRequired(objSlice interface{}) error { | ||
return AssertRecurseInterfaceRequired(objSlice, func(obj interface{}) error { | ||
aTriggerError, ok := obj.(TriggerError) | ||
if !ok { | ||
return ErrTypeAssertionError | ||
} | ||
return AssertTriggerErrorRequired(aTriggerError) | ||
}) | ||
} |
Oops, something went wrong.