Sanitize sets defaults to MessageOutstanding
()
| 16 | |
| 17 | // Sanitize sets defaults to MessageOutstanding |
| 18 | func (input *WebhookIndex) Sanitize() WebhookIndex { |
| 19 | if strings.TrimSpace(input.Limit) == "" { |
| 20 | input.Limit = "1" |
| 21 | } |
| 22 | input.Query = strings.TrimSpace(input.Query) |
| 23 | input.Skip = strings.TrimSpace(input.Skip) |
| 24 | if input.Skip == "" { |
| 25 | input.Skip = "0" |
| 26 | } |
| 27 | return *input |
| 28 | } |
| 29 | |
| 30 | // ToIndexParams converts HeartbeatIndex to repositories.IndexParams |
| 31 | func (input *WebhookIndex) ToIndexParams() repositories.IndexParams { |