github.com/crowdsecurity/crowdsec@v1.6.1/pkg/csconfig/hub.go (about)

     1  package csconfig
     2  
     3  // LocalHubCfg holds the configuration for a local hub: where to download etc.
     4  type LocalHubCfg struct {
     5  	HubIndexFile   string	// Path to the local index file
     6  	HubDir         string	// Where the hub items are downloaded
     7  	InstallDir     string	// Where to install items
     8  	InstallDataDir string	// Where to install data
     9  }
    10  
    11  func (c *Config) loadHub() error {
    12  	c.Hub = &LocalHubCfg{
    13  		HubIndexFile:   c.ConfigPaths.HubIndexFile,
    14  		HubDir:         c.ConfigPaths.HubDir,
    15  		InstallDir:     c.ConfigPaths.ConfigDir,
    16  		InstallDataDir: c.ConfigPaths.DataDir,
    17  	}
    18  
    19  	return nil
    20  }