Documentation ¶
Overview ¶
© 2021 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
© 2021 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
© 2021 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
© 2021 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
© 2021 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func BuildRestConfig(apiServer, apiServerToken, caData string, tls rest.TLSClientConfig) (*rest.Config, error)
- func GetAuthorizedRestConfig(apiServer, apiServerToken, caData string, tls rest.TLSClientConfig, ...) (restConfig *rest.Config, authorized bool, err error)
- func IsAuthorizedFor(restConfig *rest.Config, gvr schema.GroupVersionResource, namespace string) (bool, error)
- func IsUnknownAuthorityError(err error) bool
- func ToMeta(obj runtime.Object) metav1.Object
- func ToUnstructured(from runtime.Object) (*unstructured.Unstructured, error)
- type Interface
- func ForClusterRole(client kubernetes.Interface) Interface
- func ForClusterRoleBinding(client kubernetes.Interface) Interface
- func ForDaemonSet(client kubernetes.Interface, namespace string) Interface
- func ForDeployment(client kubernetes.Interface, namespace string) Interface
- func ForDynamic(client dynamic.ResourceInterface) Interface
- func ForPod(client kubernetes.Interface, namespace string) Interface
- func ForRole(client kubernetes.Interface, namespace string) Interface
- func ForRoleBinding(client kubernetes.Interface, namespace string) Interface
- func ForServiceAccount(client kubernetes.Interface, namespace string) Interface
- type InterfaceFuncs
- func (i *InterfaceFuncs) Create(obj runtime.Object) (runtime.Object, error)
- func (i *InterfaceFuncs) Delete(name string, options *metav1.DeleteOptions) error
- func (i *InterfaceFuncs) Get(name string, options metav1.GetOptions) (runtime.Object, error)
- func (i *InterfaceFuncs) Update(obj runtime.Object) (runtime.Object, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRestConfig ¶
func GetAuthorizedRestConfig ¶
func GetAuthorizedRestConfig(apiServer, apiServerToken, caData string, tls rest.TLSClientConfig, gvr schema.GroupVersionResource, namespace string) (restConfig *rest.Config, authorized bool, err error)
func IsAuthorizedFor ¶
func IsUnknownAuthorityError ¶
func ToUnstructured ¶
func ToUnstructured(from runtime.Object) (*unstructured.Unstructured, error)
Types ¶
type Interface ¶
type Interface interface { Get(name string, options metav1.GetOptions) (runtime.Object, error) Create(obj runtime.Object) (runtime.Object, error) Update(obj runtime.Object) (runtime.Object, error) Delete(name string, options *metav1.DeleteOptions) error }
func ForClusterRole ¶
func ForClusterRole(client kubernetes.Interface) Interface
func ForClusterRoleBinding ¶
func ForClusterRoleBinding(client kubernetes.Interface) Interface
func ForDaemonSet ¶
func ForDaemonSet(client kubernetes.Interface, namespace string) Interface
func ForDeployment ¶
func ForDeployment(client kubernetes.Interface, namespace string) Interface
func ForDynamic ¶
func ForDynamic(client dynamic.ResourceInterface) Interface
func ForRoleBinding ¶
func ForRoleBinding(client kubernetes.Interface, namespace string) Interface
func ForServiceAccount ¶
func ForServiceAccount(client kubernetes.Interface, namespace string) Interface
type InterfaceFuncs ¶
type InterfaceFuncs struct { GetFunc func(name string, options metav1.GetOptions) (runtime.Object, error) CreateFunc func(obj runtime.Object) (runtime.Object, error) UpdateFunc func(obj runtime.Object) (runtime.Object, error) DeleteFunc func(name string, options *metav1.DeleteOptions) error }
func (*InterfaceFuncs) Delete ¶
func (i *InterfaceFuncs) Delete(name string, options *metav1.DeleteOptions) error
func (*InterfaceFuncs) Get ¶
func (i *InterfaceFuncs) Get(name string, options metav1.GetOptions) (runtime.Object, error)