Skip to content
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

Revert "create RequestBody struct, implement it using requests, add r… #5145

Merged
merged 1 commit into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions common/authorization/authority_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions common/authorization/authorizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ type (
WorkflowType *types.WorkflowType
TaskList *types.TaskList
Permission Permission
RequestBody FilteredRequestBody // request object except for data inputs (PII)
}

// Result is result from authority.
Expand Down Expand Up @@ -98,8 +97,3 @@ func GetAuthProviderClient(privateKey string) (clientworker.AuthorizationProvide
}
return clientworker.NewAdminJwtAuthorizationProvider(pk), nil
}

// FilteredRequestBody request object except for data inputs (PII)
type FilteredRequestBody interface {
SerializeForLogging() (string, error)
}
10 changes: 0 additions & 10 deletions common/log/tag/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,21 +469,11 @@ func ActorID(actorID string) Tag {
return newStringTag("actor-id", actorID)
}

// ActorEmail returns tag for the actor's email address
func ActorEmail(actorEmail string) Tag {
return newStringTag("actor-email", actorEmail)
}

// HandlerCall returns tag for the API name of a request
func HandlerCall(handlerCall string) Tag {
return newStringTag("handler-call", handlerCall)
}

// RequestBody returns the tag for the API request body
func RequestBody(requestBody string) Tag {
return newStringTag("request-body", requestBody)
}

// history engine shard

// ShardID returns tag for ShardID
Expand Down
36 changes: 0 additions & 36 deletions common/types/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ type AddSearchAttributeRequest struct {
SecurityToken string `json:"securityToken,omitempty"`
}

func (v *AddSearchAttributeRequest) SerializeForLogging() (string, error) {
return SerializeRequest(v)
}

// GetSearchAttribute is an internal getter (TBD...)
func (v *AddSearchAttributeRequest) GetSearchAttribute() (o map[string]IndexedValueType) {
if v != nil && v.SearchAttribute != nil {
Expand All @@ -51,10 +47,6 @@ type AdminDescribeWorkflowExecutionRequest struct {
Execution *WorkflowExecution `json:"execution,omitempty"`
}

func (v *AdminDescribeWorkflowExecutionRequest) SerializeForLogging() (string, error) {
return SerializeRequest(v)
}

// GetDomain is an internal getter (TBD...)
func (v *AdminDescribeWorkflowExecutionRequest) GetDomain() (o string) {
if v != nil {
Expand Down Expand Up @@ -99,10 +91,6 @@ type GetWorkflowExecutionRawHistoryV2Request struct {
NextPageToken []byte `json:"nextPageToken,omitempty"`
}

func (v *GetWorkflowExecutionRawHistoryV2Request) SerializeForLogging() (string, error) {
return SerializeRequest(v)
}

// GetDomain is an internal getter (TBD...)
func (v *GetWorkflowExecutionRawHistoryV2Request) GetDomain() (o string) {
if v != nil {
Expand Down Expand Up @@ -218,10 +206,6 @@ type ResendReplicationTasksRequest struct {
EndVersion *int64 `json:"endVersion,omitempty"`
}

func (v *ResendReplicationTasksRequest) SerializeForLogging() (string, error) {
return SerializeRequest(v)
}

// GetWorkflowID is an internal getter (TBD...)
func (v *ResendReplicationTasksRequest) GetWorkflowID() (o string) {
if v != nil {
Expand Down Expand Up @@ -258,10 +242,6 @@ type GetDynamicConfigRequest struct {
Filters []*DynamicConfigFilter `json:"filters,omitempty"`
}

func (v *GetDynamicConfigRequest) SerializeForLogging() (string, error) {
return SerializeRequest(v)
}

type GetDynamicConfigResponse struct {
Value *DataBlob `json:"value,omitempty"`
}
Expand All @@ -271,30 +251,18 @@ type UpdateDynamicConfigRequest struct {
ConfigValues []*DynamicConfigValue `json:"configValues,omitempty"`
}

func (v *UpdateDynamicConfigRequest) SerializeForLogging() (string, error) {
return SerializeRequest(v)
}

type RestoreDynamicConfigRequest struct {
ConfigName string `json:"configName,omitempty"`
Filters []*DynamicConfigFilter `json:"filters,omitempty"`
}

func (v *RestoreDynamicConfigRequest) SerializeForLogging() (string, error) {
return SerializeRequest(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) SerializeForLogging() (string, error) {
return SerializeRequest(v)
}

func (v *AdminDeleteWorkflowRequest) GetDomain() (o string) {
if v != nil {
return v.Domain
Expand Down Expand Up @@ -330,10 +298,6 @@ type ListDynamicConfigRequest struct {
ConfigName string `json:"configName,omitempty"`
}

func (v *ListDynamicConfigRequest) SerializeForLogging() (string, error) {
return SerializeRequest(v)
}

type ListDynamicConfigResponse struct {
Entries []*DynamicConfigEntry `json:"entries,omitempty"`
}
24 changes: 0 additions & 24 deletions common/types/replicator.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,6 @@ type GetDLQReplicationMessagesRequest struct {
TaskInfos []*ReplicationTaskInfo `json:"taskInfos,omitempty"`
}

func (v *GetDLQReplicationMessagesRequest) SerializeForLogging() (string, error) {
return SerializeRequest(v)
}

// GetTaskInfos is an internal getter (TBD...)
func (v *GetDLQReplicationMessagesRequest) GetTaskInfos() (o []*ReplicationTaskInfo) {
if v != nil && v.TaskInfos != nil {
Expand All @@ -253,10 +249,6 @@ type GetDomainReplicationMessagesRequest struct {
ClusterName string `json:"clusterName,omitempty"`
}

func (v *GetDomainReplicationMessagesRequest) SerializeForLogging() (string, error) {
return SerializeRequest(v)
}

// GetLastRetrievedMessageID is an internal getter (TBD...)
func (v *GetDomainReplicationMessagesRequest) GetLastRetrievedMessageID() (o int64) {
if v != nil && v.LastRetrievedMessageID != nil {
Expand Down Expand Up @@ -292,10 +284,6 @@ type GetReplicationMessagesRequest struct {
ClusterName string `json:"clusterName,omitempty"`
}

func (v *GetReplicationMessagesRequest) SerializeForLogging() (string, error) {
return SerializeRequest(v)
}

// GetClusterName is an internal getter (TBD...)
func (v *GetReplicationMessagesRequest) GetClusterName() (o string) {
if v != nil {
Expand Down Expand Up @@ -405,10 +393,6 @@ type MergeDLQMessagesRequest struct {
NextPageToken []byte `json:"nextPageToken,omitempty"`
}

func (v *MergeDLQMessagesRequest) SerializeForLogging() (string, error) {
return SerializeRequest(v)
}

// GetType is an internal getter (TBD...)
func (v *MergeDLQMessagesRequest) GetType() (o DLQType) {
if v != nil && v.Type != nil {
Expand Down Expand Up @@ -470,10 +454,6 @@ type PurgeDLQMessagesRequest struct {
InclusiveEndMessageID *int64 `json:"inclusiveEndMessageID,omitempty"`
}

func (v *PurgeDLQMessagesRequest) SerializeForLogging() (string, error) {
return SerializeRequest(v)
}

// GetType is an internal getter (TBD...)
func (v *PurgeDLQMessagesRequest) GetType() (o DLQType) {
if v != nil && v.Type != nil {
Expand Down Expand Up @@ -516,10 +496,6 @@ type ReadDLQMessagesRequest struct {
NextPageToken []byte `json:"nextPageToken,omitempty"`
}

func (v *ReadDLQMessagesRequest) SerializeForLogging() (string, error) {
return SerializeRequest(v)
}

// GetType is an internal getter (TBD...)
func (v *ReadDLQMessagesRequest) GetType() (o DLQType) {
if v != nil && v.Type != nil {
Expand Down
Loading