-
Notifications
You must be signed in to change notification settings - Fork 800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create RequestBody struct, implement it using requests, add requestbody into Attribute for auditing #5124
create RequestBody struct, implement it using requests, add requestbody into Attribute for auditing #5124
Changes from 13 commits
b98c07b
0a1b61f
1953ffe
acc3fed
4a05932
e3289ec
f202aa1
24c792b
8939918
5a0894b
839db23
80df291
b7006fd
e57f774
2e120ea
2e5d4d7
234e3c6
fcc5429
6428a9e
f891ee7
263d9b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,10 @@ type AddSearchAttributeRequest struct { | |
SecurityToken string `json:"securityToken,omitempty"` | ||
} | ||
|
||
func (v *AddSearchAttributeRequest) BodyToString() string { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The naming here is a bit misleading. It's not really stringifying the struct, it's outputting a string for logging. You probably rename this to something like "SerializeForLogging". Same for the util function. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
return StructToString(*v) | ||
} | ||
|
||
// GetSearchAttribute is an internal getter (TBD...) | ||
func (v *AddSearchAttributeRequest) GetSearchAttribute() (o map[string]IndexedValueType) { | ||
if v != nil && v.SearchAttribute != nil { | ||
|
@@ -47,6 +51,10 @@ type AdminDescribeWorkflowExecutionRequest struct { | |
Execution *WorkflowExecution `json:"execution,omitempty"` | ||
} | ||
|
||
func (v *AdminDescribeWorkflowExecutionRequest) BodyToString() string { | ||
return StructToString(*v) | ||
} | ||
|
||
// GetDomain is an internal getter (TBD...) | ||
func (v *AdminDescribeWorkflowExecutionRequest) GetDomain() (o string) { | ||
if v != nil { | ||
|
@@ -91,6 +99,10 @@ type GetWorkflowExecutionRawHistoryV2Request struct { | |
NextPageToken []byte `json:"nextPageToken,omitempty"` | ||
} | ||
|
||
func (v *GetWorkflowExecutionRawHistoryV2Request) BodyToString() string { | ||
return StructToString(*v) | ||
} | ||
|
||
// GetDomain is an internal getter (TBD...) | ||
func (v *GetWorkflowExecutionRawHistoryV2Request) GetDomain() (o string) { | ||
if v != nil { | ||
|
@@ -206,6 +218,10 @@ type ResendReplicationTasksRequest struct { | |
EndVersion *int64 `json:"endVersion,omitempty"` | ||
} | ||
|
||
func (v *ResendReplicationTasksRequest) BodyToString() string { | ||
return StructToString(*v) | ||
} | ||
|
||
// GetWorkflowID is an internal getter (TBD...) | ||
func (v *ResendReplicationTasksRequest) GetWorkflowID() (o string) { | ||
if v != nil { | ||
|
@@ -242,6 +258,10 @@ type GetDynamicConfigRequest struct { | |
Filters []*DynamicConfigFilter `json:"filters,omitempty"` | ||
} | ||
|
||
func (v *GetDynamicConfigRequest) BodyToString() string { | ||
return StructToString(*v) | ||
} | ||
|
||
type GetDynamicConfigResponse struct { | ||
Value *DataBlob `json:"value,omitempty"` | ||
} | ||
|
@@ -251,18 +271,30 @@ type UpdateDynamicConfigRequest struct { | |
ConfigValues []*DynamicConfigValue `json:"configValues,omitempty"` | ||
} | ||
|
||
func (v *UpdateDynamicConfigRequest) BodyToString() string { | ||
return StructToString(*v) | ||
} | ||
|
||
type RestoreDynamicConfigRequest struct { | ||
ConfigName string `json:"configName,omitempty"` | ||
Filters []*DynamicConfigFilter `json:"filters,omitempty"` | ||
} | ||
|
||
func (v *RestoreDynamicConfigRequest) BodyToString() string { | ||
return StructToString(*v) | ||
} | ||
|
||
// AdminDeleteWorkflowRequest is an internal type (TBD...) | ||
type AdminDeleteWorkflowRequest struct { | ||
Domain string `json:"domain,omitempty"` | ||
Execution *WorkflowExecution `json:"execution,omitempty"` | ||
SkipErrors bool `json:"skipErrors,omitempty"` | ||
} | ||
|
||
func (v *AdminDeleteWorkflowRequest) BodyToString() string { | ||
return StructToString(*v) | ||
} | ||
|
||
func (v *AdminDeleteWorkflowRequest) GetDomain() (o string) { | ||
if v != nil { | ||
return v.Domain | ||
|
@@ -298,6 +330,10 @@ type ListDynamicConfigRequest struct { | |
ConfigName string `json:"configName,omitempty"` | ||
} | ||
|
||
func (v *ListDynamicConfigRequest) BodyToString() string { | ||
return StructToString(*v) | ||
} | ||
|
||
type ListDynamicConfigResponse struct { | ||
Entries []*DynamicConfigEntry `json:"entries,omitempty"` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe let's call ManualRequestBody as FilteredRequestBody and add a comment next to it saying "request object except for data inputs"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done