func (s *ClusterRoleStorage) Get(ctx kapi.Context, name string) (runtime.Object, error) { ret, err := s.roleStorage.Get(ctx, name) if ret == nil { return nil, err } return authorizationapi.ToClusterRole(ret.(*authorizationapi.Role)), err }
func (s *ClusterRoleStorage) Update(ctx kapi.Context, name string, objInfo rest.UpdatedObjectInfo) (runtime.Object, bool, error) { ret, created, err := s.roleStorage.Update(ctx, name, convertingObjectInfo{objInfo}) if ret == nil { return nil, created, err } return authorizationapi.ToClusterRole(ret.(*authorizationapi.Role)), created, err }
func (s *ClusterRoleStorage) Update(ctx kapi.Context, obj runtime.Object) (runtime.Object, bool, error) { clusterObj := obj.(*authorizationapi.ClusterRole) convertedObj := authorizationapi.ToRole(clusterObj) ret, created, err := s.roleStorage.Update(ctx, convertedObj) if ret == nil { return nil, created, err } return authorizationapi.ToClusterRole(ret.(*authorizationapi.Role)), created, err }
func (i convertingObjectInfo) UpdatedObject(ctx kapi.Context, old runtime.Object) (runtime.Object, error) { oldObj := old.(*authorizationapi.Role) convertedOldObj := authorizationapi.ToClusterRole(oldObj) obj, err := i.UpdatedObjectInfo.UpdatedObject(ctx, convertedOldObj) if err != nil { return nil, err } clusterObj := obj.(*authorizationapi.ClusterRole) convertedObj := authorizationapi.ToRole(clusterObj) return convertedObj, nil }
func (m *ClusterRoleStorage) CreateClusterRoleWithEscalation(ctx kapi.Context, obj *authorizationapi.ClusterRole) (*authorizationapi.ClusterRole, error) { in := authorizationapi.ToRole(obj) ret, err := m.roleStorage.CreateRoleWithEscalation(ctx, in) return authorizationapi.ToClusterRole(ret), err }