MCPcopy Create free account
hub / github.com/Unpackerr/unpackerr / samplePayload

Function samplePayload

pkg/unpackerr/webhook_samples.go:54–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52}
53
54func 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}

Callers 1

sampleWebhookMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected