当前位置: 首页>>代码示例>>Golang>>正文


Golang rbac.Subject类代码示例

本文整理汇总了Golang中k8s/io/kubernetes/pkg/apis/rbac.Subject的典型用法代码示例。如果您正苦于以下问题:Golang Subject类的具体用法?Golang Subject怎么用?Golang Subject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Subject类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: autoConvert_v1alpha1_Subject_To_rbac_Subject

func autoConvert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error {
	out.Kind = in.Kind
	out.APIVersion = in.APIVersion
	out.Name = in.Name
	out.Namespace = in.Namespace
	return nil
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:7,代码来源:zz_generated.conversion.go

示例2: Convert_v1alpha1_Subject_To_rbac_Subject

func Convert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *api.Subject, s conversion.Scope) error {
	if err := autoConvert_v1alpha1_Subject_To_rbac_Subject(in, out, s); err != nil {
		return err
	}

	// User * in v1alpha1 will only match all authenticated users
	// This is only for compatibility with old RBAC bindings
	// Special treatment for * should not be included in v1beta1
	if out.Kind == UserKind && out.Name == "*" {
		out.Kind = GroupKind
		out.Name = allAuthenticated
	}

	return nil
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:15,代码来源:conversion.go


注:本文中的k8s/io/kubernetes/pkg/apis/rbac.Subject类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。