Subscriber is an interface to be implemented by components that can extract relevant subscription details from a kargoapi.RepoSubscription and use them to discover corresponding artifacts.
| 12 | // relevant subscription details from a kargoapi.RepoSubscription and use them |
| 13 | // to discover corresponding artifacts. |
| 14 | type Subscriber interface { |
| 15 | // ApplySubscriptionDefaults applies default values to the provided |
| 16 | // kargoapi.RepoSubscription. |
| 17 | ApplySubscriptionDefaults( |
| 18 | ctx context.Context, |
| 19 | sub *kargoapi.RepoSubscription, |
| 20 | ) error |
| 21 | // ValidateSubscription validates the provided kargoapi.RepoSubscription. |
| 22 | ValidateSubscription( |
| 23 | ctx context.Context, |
| 24 | f *field.Path, |
| 25 | sub kargoapi.RepoSubscription, |
| 26 | ) field.ErrorList |
| 27 | // DiscoverArtifacts discovers artifacts according to the parameters of the |
| 28 | // provided kargoapi.RepoSubscription. Implementations may return a value of |
| 29 | // any type, but in practice, callers can only make sense of: |
| 30 | // - kargoapi.ChartDiscoveryResult |
| 31 | // - kargoapi.GitDiscoveryResult |
| 32 | // - kargoapi.ImageDiscoveryResult |
| 33 | // - kargoapi.DiscoveryResult |
| 34 | DiscoverArtifacts( |
| 35 | ctx context.Context, |
| 36 | project string, |
| 37 | sub kargoapi.RepoSubscription, |
| 38 | ) (any, error) |
| 39 | } |
no outgoing calls
no test coverage detected