mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-10 20:05:55 +02:00
* pkg/cwhub: improve support for k8s config maps as custom items - allow links to links - ignore hidden ..data directories, but allow links to their content * allow any number of subdirectories in /etc/crowdsec/{hubtype} * item name as subdir/file.yaml * improve func test * lint
19 lines
622 B
Go
19 lines
622 B
Go
package cwhub
|
|
|
|
import (
|
|
"errors"
|
|
"fmt"
|
|
)
|
|
|
|
// ErrNilRemoteHub is returned when trying to download with a local-only configuration.
|
|
var ErrNilRemoteHub = errors.New("remote hub configuration is not provided. Please report this issue to the developers")
|
|
|
|
// IndexNotFoundError is returned when the remote hub index is not found.
|
|
type IndexNotFoundError struct {
|
|
URL string
|
|
Branch string
|
|
}
|
|
|
|
func (e IndexNotFoundError) Error() string {
|
|
return fmt.Sprintf("index not found at %s, branch '%s'. Please check the .cscli.hub_branch value if you specified it in config.yaml, or use 'master' if not sure", e.URL, e.Branch)
|
|
}
|