~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/gopkg.in/goose.v1/testservices/identityservice/identityservice.go

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 string) *UserInfo
 
8
        FindUser(token string) (*UserInfo, error)
 
9
        RegisterServiceProvider(name, serviceType string, serviceProvider ServiceProvider)
 
10
        AddService(service Service)
 
11
        SetupHTTP(mux *http.ServeMux)
 
12
}
 
13
 
 
14
// Service wraps two possible Service versions
 
15
type Service struct {
 
16
        V2 V2Service
 
17
        V3 V3Service
 
18
}
 
19
 
 
20
// ServiceProvider is an Openstack module which has service endpoints.
 
21
type ServiceProvider interface {
 
22
        // For Keystone V2
 
23
        Endpoints() []Endpoint
 
24
        // For Keystone V3
 
25
        V3Endpoints() []V3Endpoint
 
26
}