gopkg.in/goose.v2@v2.0.1/testservices/identityservice/identityservice.go (about) 1 package identityservice 2 3 import "net/http" 4 5 // An IdentityService provides user authentication for an Openstack instance. 6 type IdentityService interface { 7 AddUser(user, secret, tenant, authDomain string) *UserInfo 8 FindUser(token string) (*UserInfo, error) 9 ClearToken(user string) error 10 RegisterServiceProvider(name, serviceType string, serviceProvider ServiceProvider) 11 AddService(service Service) 12 SetupHTTP(mux *http.ServeMux) 13 } 14 15 // Service wraps two possible Service versions 16 type Service struct { 17 V2 V2Service 18 V3 V3Service 19 } 20 21 // ServiceProvider is an Openstack module which has service endpoints. 22 type ServiceProvider interface { 23 // For Keystone V2 24 Endpoints() []Endpoint 25 // For Keystone V3 26 V3Endpoints() []V3Endpoint 27 }