git-project-manager/pkg/manager/manager.go
2023-12-04 16:53:01 -05:00

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)
}