Exemplo n.º 1
0
func Convert_v1_PolicyBinding_To_api_PolicyBinding(in *PolicyBinding, out *newer.PolicyBinding, s conversion.Scope) error {
	if err := autoConvert_v1_PolicyBinding_To_api_PolicyBinding(in, out, s); err != nil {
		return err
	}
	if out.RoleBindings == nil {
		out.RoleBindings = make(map[string]*newer.RoleBinding)
	}
	return nil
}
Exemplo n.º 2
0
// ReadOnlyPolicyBindingInterface exposes methods on PolicyBindings resources
func (t *testReadOnlyPolicyBinding) List(options kapi.ListOptions) (*authorizationapi.PolicyBindingList, error) {
	t.lock.Lock()
	defer t.lock.Unlock()

	ret := &authorizationapi.PolicyBindingList{}
	if t.binding != nil {
		returning := authorizationapi.PolicyBinding{}
		returning.RoleBindings = map[string]*authorizationapi.RoleBinding{}
		for k, v := range t.binding.RoleBindings {
			returning.RoleBindings[k] = v
		}

		ret.Items = []authorizationapi.PolicyBinding{returning}
	}

	return ret, nil
}
Exemplo n.º 3
0
func convert_v1_PolicyBinding_To_api_PolicyBinding(in *PolicyBinding, out *newer.PolicyBinding, s conversion.Scope) error {
	out.LastModified = in.LastModified
	out.RoleBindings = make(map[string]*newer.RoleBinding)
	return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
}