| 105 | ) |
| 106 | |
| 107 | func (c SummaryQueryErrorCode) Message() string { |
| 108 | switch c { |
| 109 | case SummaryQueryErrorCodeFeatureNotFound: |
| 110 | return "Feature not found" |
| 111 | case SummaryQueryErrorCodeInvalidQuery: |
| 112 | return "Invalid query" |
| 113 | case SummaryQueryErrorCodeSavedSearchNotFound: |
| 114 | return "Saved search not found" |
| 115 | case SummaryQueryErrorCodeHotlistNotFound: |
| 116 | return "Hotlist not found" |
| 117 | case SummaryQueryErrorCodeSavedSearchCycleDetected: |
| 118 | return "Saved search cycle detected" |
| 119 | case SummaryQueryErrorCodeMaxDepthExceeded: |
| 120 | return "Saved search max depth exceeded" |
| 121 | case SummaryQueryErrorCodeQueryGrammar: |
| 122 | return "Invalid query grammar" |
| 123 | case SummaryQueryErrorCodeUnknown: |
| 124 | fallthrough |
| 125 | default: |
| 126 | return "Unknown query error" |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | type SnapshotOrigin string |
| 131 | |