MCPcopy Create free account
hub / github.com/monitoror/monitoror / Validate

Method Validate

monitorables/github/github.go:59–73  ·  view source on GitHub ↗
(variantName coreModels.VariantName)

Source from the content-addressed store, hash-verified

57}
58
59func (m *Monitorable) Validate(variantName coreModels.VariantName) (bool, []error) {
60 conf := m.config[variantName]
61
62 // No configuration set
63 if conf.URL == githubConfig.Default.URL && conf.Token == "" {
64 return false, nil
65 }
66
67 // Validate Config
68 if errors := pkgMonitorable.ValidateConfig(conf, variantName); errors != nil {
69 return false, errors
70 }
71
72 return true, nil
73}
74
75func (m *Monitorable) Enable(variantName coreModels.VariantName) {
76 conf := m.config[variantName]

Callers 1

TestNewMonitorableFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestNewMonitorableFunction · 0.76