src/server/pkg/serviceenv/config.go
func NewConfiguration(config interface{}) *Configuration {
	configuration := &Configuration{}
	switch config.(type) {
	case *GlobalConfiguration:
		configuration.GlobalConfiguration = config.(*GlobalConfiguration)
		return configuration
	case *PachdFullConfiguration:
		configuration.GlobalConfiguration = &config.(*PachdFullConfiguration).GlobalConfiguration
		configuration.PachdSpecificConfiguration = &config.(*PachdFullConfiguration).PachdSpecificConfiguration
		return configuration
	case *WorkerFullConfiguration:
		configuration.GlobalConfiguration = &config.(*WorkerFullConfiguration).GlobalConfiguration
		configuration.WorkerSpecificConfiguration = &config.(*WorkerFullConfiguration).WorkerSpecificConfiguration
		return configuration
	default:
		return nil
	}
}
func NewConfiguration(config interface{}) *Configuration {
	configuration := &Configuration{}
	switch config.(type) {
	case *GlobalConfiguration:
		configuration.GlobalConfiguration = config.(*GlobalConfiguration)
		return configuration
	case *PachdFullConfiguration:
		configuration.GlobalConfiguration = &config.(*PachdFullConfiguration).GlobalConfiguration
		configuration.PachdSpecificConfiguration = &config.(*PachdFullConfiguration).PachdSpecificConfiguration
		return configuration
	case *WorkerFullConfiguration:
		configuration.GlobalConfiguration = &config.(*WorkerFullConfiguration).GlobalConfiguration
		configuration.WorkerSpecificConfiguration = &config.(*WorkerFullConfiguration).WorkerSpecificConfiguration
		return configuration
	default:
		return nil
	}
}
// NewConfiguration creates a generic configuration from a specific type of configuration.