| 52 | } |
| 53 | |
| 54 | func samplePayload() *WebhookPayload { |
| 55 | return &WebhookPayload{ |
| 56 | App: "Starr", |
| 57 | Path: "/this/is/a/path", |
| 58 | IDs: map[string]any{ |
| 59 | "title": "Some Cool Title Name Here", |
| 60 | "downloadId": fmt.Sprintf("some-id-goes-here-%d", time.Now().Unix()), |
| 61 | "otherId": "another-id-here-like-imdb", |
| 62 | }, |
| 63 | Time: time.Now(), |
| 64 | Go: runtime.Version(), |
| 65 | OS: runtime.GOOS, |
| 66 | Arch: runtime.GOARCH, |
| 67 | Version: version.Version, |
| 68 | Revision: version.Revision, |
| 69 | Branch: version.Branch, |
| 70 | Started: version.Started, |
| 71 | Data: &XtractPayload{ |
| 72 | Start: version.Started, |
| 73 | Elapsed: cnfg.Duration{Duration: time.Since(version.Started)}, |
| 74 | Archives: []string{"/this/is/the/extraction/path/archive.rar", "/this/is/the/extraction/path/archive.sub.rar"}, |
| 75 | Error: "This is where an error goes.", |
| 76 | Output: "/this/is/the/extraction/path_unpackerred", |
| 77 | Bytes: 0, |
| 78 | Files: []string{"/this/is/the/extraction/path/file.mkv", "/this/is/the/extraction/path/file.sub"}, |
| 79 | }, |
| 80 | } |
| 81 | } |