-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from Clever/use-projection-expression-for-summary
use ddb projection expression for summaryOnly=true
- Loading branch information
Showing
16 changed files
with
464 additions
and
245 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
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,97 @@ | ||
package models | ||
|
||
// This file was generated by the swagger tool. | ||
// Editing this file might prove futile when you re-run the swagger generate command | ||
|
||
import ( | ||
strfmt "github.com/go-openapi/strfmt" | ||
"github.com/go-openapi/swag" | ||
|
||
"github.com/go-openapi/errors" | ||
"github.com/go-openapi/validate" | ||
) | ||
|
||
// WorkflowQuery workflow query | ||
// swagger:model WorkflowQuery | ||
type WorkflowQuery struct { | ||
|
||
// limit | ||
// Maximum: 10000 | ||
Limit int64 `json:"limit,omitempty"` | ||
|
||
// oldest first | ||
OldestFirst bool `json:"oldestFirst,omitempty"` | ||
|
||
// page token | ||
PageToken string `json:"pageToken,omitempty"` | ||
|
||
// status | ||
Status WorkflowStatus `json:"status,omitempty"` | ||
|
||
// summary only | ||
SummaryOnly *bool `json:"summaryOnly,omitempty"` | ||
|
||
// workflow definition name | ||
// Required: true | ||
WorkflowDefinitionName *string `json:"workflowDefinitionName"` | ||
} | ||
|
||
// Validate validates this workflow query | ||
func (m *WorkflowQuery) Validate(formats strfmt.Registry) error { | ||
var res []error | ||
|
||
if err := m.validateLimit(formats); err != nil { | ||
// prop | ||
res = append(res, err) | ||
} | ||
|
||
if err := m.validateStatus(formats); err != nil { | ||
// prop | ||
res = append(res, err) | ||
} | ||
|
||
if err := m.validateWorkflowDefinitionName(formats); err != nil { | ||
// prop | ||
res = append(res, err) | ||
} | ||
|
||
if len(res) > 0 { | ||
return errors.CompositeValidationError(res...) | ||
} | ||
return nil | ||
} | ||
|
||
func (m *WorkflowQuery) validateLimit(formats strfmt.Registry) error { | ||
|
||
if swag.IsZero(m.Limit) { // not required | ||
return nil | ||
} | ||
|
||
if err := validate.MaximumInt("limit", "body", int64(m.Limit), 10000, false); err != nil { | ||
return err | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func (m *WorkflowQuery) validateStatus(formats strfmt.Registry) error { | ||
|
||
if swag.IsZero(m.Status) { // not required | ||
return nil | ||
} | ||
|
||
if err := m.Status.Validate(formats); err != nil { | ||
return err | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func (m *WorkflowQuery) validateWorkflowDefinitionName(formats strfmt.Registry) error { | ||
|
||
if err := validate.Required("workflowDefinitionName", "body", m.WorkflowDefinitionName); err != nil { | ||
return err | ||
} | ||
|
||
return nil | ||
} |
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,112 @@ | ||
package models | ||
|
||
// This file was generated by the swagger tool. | ||
// Editing this file might prove futile when you re-run the swagger generate command | ||
|
||
import ( | ||
strfmt "github.com/go-openapi/strfmt" | ||
"github.com/go-openapi/swag" | ||
|
||
"github.com/go-openapi/errors" | ||
) | ||
|
||
// WorkflowSummary workflow summary | ||
// swagger:model WorkflowSummary | ||
type WorkflowSummary struct { | ||
|
||
// created at | ||
CreatedAt strfmt.DateTime `json:"createdAt,omitempty"` | ||
|
||
// id | ||
ID string `json:"id,omitempty"` | ||
|
||
// input | ||
Input string `json:"input,omitempty"` | ||
|
||
// last updated | ||
LastUpdated strfmt.DateTime `json:"lastUpdated,omitempty"` | ||
|
||
// namespace | ||
Namespace string `json:"namespace,omitempty"` | ||
|
||
// queue | ||
Queue string `json:"queue,omitempty"` | ||
|
||
// workflow-id's of workflows created as retries for this workflow | ||
Retries []string `json:"retries"` | ||
|
||
// workflow-id of original workflow in case this is a retry | ||
RetryFor string `json:"retryFor,omitempty"` | ||
|
||
// status | ||
Status WorkflowStatus `json:"status,omitempty"` | ||
|
||
// tags: object with key-value pairs; keys and values should be strings | ||
Tags map[string]interface{} `json:"tags,omitempty"` | ||
|
||
// workflow definition | ||
WorkflowDefinition *WorkflowDefinition `json:"workflowDefinition,omitempty"` | ||
} | ||
|
||
// Validate validates this workflow summary | ||
func (m *WorkflowSummary) Validate(formats strfmt.Registry) error { | ||
var res []error | ||
|
||
if err := m.validateRetries(formats); err != nil { | ||
// prop | ||
res = append(res, err) | ||
} | ||
|
||
if err := m.validateStatus(formats); err != nil { | ||
// prop | ||
res = append(res, err) | ||
} | ||
|
||
if err := m.validateWorkflowDefinition(formats); err != nil { | ||
// prop | ||
res = append(res, err) | ||
} | ||
|
||
if len(res) > 0 { | ||
return errors.CompositeValidationError(res...) | ||
} | ||
return nil | ||
} | ||
|
||
func (m *WorkflowSummary) validateRetries(formats strfmt.Registry) error { | ||
|
||
if swag.IsZero(m.Retries) { // not required | ||
return nil | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func (m *WorkflowSummary) validateStatus(formats strfmt.Registry) error { | ||
|
||
if swag.IsZero(m.Status) { // not required | ||
return nil | ||
} | ||
|
||
if err := m.Status.Validate(formats); err != nil { | ||
return err | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func (m *WorkflowSummary) validateWorkflowDefinition(formats strfmt.Registry) error { | ||
|
||
if swag.IsZero(m.WorkflowDefinition) { // not required | ||
return nil | ||
} | ||
|
||
if m.WorkflowDefinition != nil { | ||
|
||
if err := m.WorkflowDefinition.Validate(formats); err != nil { | ||
return err | ||
} | ||
} | ||
|
||
return nil | ||
} |
Oops, something went wrong.