Github user geomacy commented on a diff in the pull request:

    https://github.com/apache/brooklyn-client/pull/18#discussion_r61283407
  
    --- Diff: io/config.go ---
    @@ -24,27 +24,53 @@ import (
        "path/filepath"
     
        "github.com/apache/brooklyn-client/error_handler"
    +   "github.com/apache/brooklyn-client/plugin"
     )
     
     type Config struct {
        FilePath string
    -   Map      map[string]interface{}
    +   Model    ConfigModel
    +}
    +
    +type ConfigModel struct {
    +   Auth      map[string]Credentials
    +   PluginDir string
    +   Plugins   map[string]*plugin.PluginMetadata
    +   Target    string
    +}
    +
    +type Url struct {
    +   Target string
    +}
    +
    +type Credentials struct {
    +   Username string
    +   Password string
     }
     
     func GetConfig() (config *Config) {
        // check to see if $BRCLI_HOME/.brooklyn_cli or $HOME/.brooklyn_cli 
exists
        // Then parse it to get user credentials
        config = new(Config)
    +   var pluginDir string
        if os.Getenv("BRCLI_HOME") != "" {
    +           pluginDir = filepath.Join(os.Getenv("BRCLI_HOME"), "plugins")
    --- End diff --
    
    Would be nice to create $BRCLI_HOME/plugins if it doesn't exist (assuming 
BRCLI_HOME exists; if not, best complain...)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to