user

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2014 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCurrentUserContextFilter

func NewCurrentUserContextFilter(requestPath string, context UserContext, handler http.Handler) http.Handler

func NewREST

func NewREST(registry Registry) apiserver.RESTStorage

NewStorage returns a new REST.

Types

type REST

type REST struct {
	// contains filtered or unexported fields
}

REST implements the RESTStorage interface in terms of an Registry.

func (*REST) Create

func (s *REST) Create(ctx kapi.Context, obj runtime.Object) (<-chan runtime.Object, error)

Create registers the given UserIdentityMapping.

func (*REST) Delete

func (s *REST) Delete(ctx kapi.Context, id string) (<-chan runtime.Object, error)

Delete asynchronously deletes an UserIdentityMapping specified by its id.

func (*REST) Get

func (s *REST) Get(ctx kapi.Context, id string) (runtime.Object, error)

Get retrieves an UserIdentityMapping by id.

func (*REST) List

func (s *REST) List(ctx kapi.Context, selector, fields labels.Selector) (runtime.Object, error)

List retrieves a list of UserIdentityMappings that match selector.

func (*REST) New

func (s *REST) New() runtime.Object

New returns a new UserIdentityMapping for use with Create and Update.

func (*REST) Update

func (s *REST) Update(ctx kapi.Context, obj runtime.Object) (<-chan runtime.Object, error)

Update is not supported for UserIdentityMappings, as they are immutable.

type Registry

type Registry interface {
	GetUser(name string) (*api.User, error)
}

Registry is an interface for things that know how to store User objects.

type UserContext

type UserContext interface {
	Get(*http.Request) (UserInfo, bool)
}

type UserContextFunc

type UserContextFunc func(*http.Request) (UserInfo, bool)

func (UserContextFunc) Get

func (f UserContextFunc) Get(req *http.Request) (UserInfo, bool)

type UserInfo

type UserInfo interface {
	GetName() string
	GetUID() string
}

Jump to

Keyboard shortcuts

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