package gophercloud

type Provider struct {
	AuthEndpoint string
}

var providerMap = make(map[string]*Provider)

func (c *Context) RegisterProvider(name string, p *Provider) error {
	if p.AuthEndpoint == "" {
		return ErrConfiguration
	}

	c.providerMap[name] = p
	return nil
}

func (c *Context) ProviderByName(name string) (p *Provider, err error) {
	for provider, descriptor := range c.providerMap {
		if name == provider {
			return descriptor, nil
		}
	}
	return nil, ErrProvider
}
