identity

package
v0.0.0-...-3c0cf66 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	ID        string `mapstructure:"id"`
	Region    string `mapstructure:"region"`
	Interface string `mapstructure:"interface"`
	URL       string `mapstructure:"url"`
}

Endpoint contains endpoint information extracted from the keystone response.

type Handler

type Handler struct {
	Client        *gophercloud.ServiceClient
	Next          http.Handler
	ValidServices []ValidService
	ValidAdmins   []ValidAdmin
}

Handler is a custom handler for APIs which would like keystone validation. This custom handler allows us to more cleanly return an error and response, and pass some package level context into the handler.

func (Handler) ServeHTTP

func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP satisfies the http handler interface. It will check to make sure that the api caller is validated with keystone before allowing the next handler in the chain to be called.

type Project

type Project struct {
	ID   string `mapstructure:"id"`
	Name string `mapstructure:"name"`
}

Project holds project information extracted from the keystone response.

type RoleEntry

type RoleEntry struct {
	Name string `mapstructure:"name"`
}

RoleEntry contains the name of a role extracted from the keystone response.

type Roles

type Roles struct {
	Entries []RoleEntry
}

Roles contains a list of role names extracted from the keystone response.

type ServiceEntry

type ServiceEntry struct {
	ID        string     `mapstructure:"id"`
	Name      string     `mapstructure:"name"`
	Type      string     `mapstructure:"type"`
	Endpoints []Endpoint `mapstructure:"endpoints"`
}

ServiceEntry contains information about a service extracted from the keystone response.

type Services

type Services struct {
	Entries []ServiceEntry
}

Services is a list of ServiceEntry structs These structs contain information about the services keystone knows about.

type ValidAdmin

type ValidAdmin struct {
	Project string
	Role    string
}

ValidAdmin defines which project and roles are considered valid for admin.

type ValidService

type ValidService struct {
	ServiceType string
	ServiceName string
}

ValidService defines service name and type of the api service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL