32 lines
623 B
Go
32 lines
623 B
Go
|
package manager
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
type Manager struct {
|
||
|
Config *ManagerConfig
|
||
|
GitLabHost string
|
||
|
gitLabToken string
|
||
|
}
|
||
|
|
||
|
type ManagerParams struct {
|
||
|
GitLabHost string
|
||
|
GitLabToken string
|
||
|
ConfigFile string
|
||
|
}
|
||
|
|
||
|
// Returns a new instance of project manager
|
||
|
// with optional overrides for common settings
|
||
|
// More complex configuration is provided in the
|
||
|
// configuration file
|
||
|
func NewManager(p *ManagerParams) *Manager {
|
||
|
return &Manager{
|
||
|
Config: NewConfigFromFile(p.ConfigFile),
|
||
|
GitLabHost: p.GitLabHost,
|
||
|
gitLabToken: p.GitLabToken,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (m *Manager) String() string {
|
||
|
return fmt.Sprintf("%+v", *m)
|
||
|
}
|