schema

package
v0.0.0-...-480dd5c Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = types.APIVersion{
		Version: "v1",
		Group:   "authorization.cattle.io",
		Path:    "/v1-authz",
	}

	Schemas = factory.Schemas(&Version).
			AddMapperForType(&Version, v1.Project{},
			mapper.DisplayName{},
		).
		AddMapperForType(&Version, v1.ProjectRoleTemplateBinding{},
			&mapper.Move{From: "subject/name", To: "subjectName"},
			&mapper.Move{From: "subject/kind", To: "subjectKind"},
			&mapper.Move{From: "subject/namespace", To: "subjectNamespace"},
			&mapper.Drop{Field: "subject"},
		).
		MustImportAndCustomize(&Version, v1.Project{}, func(schema *types.Schema) {
			schema.SubContext = "projects"
		}).
		MustImport(&Version, v1.ProjectRoleTemplate{}).
		MustImport(&Version, v1.PodSecurityPolicyTemplate{}).
		MustImport(&Version, v1.ClusterRoleTemplate{}).
		MustImport(&Version, v1.ClusterRoleTemplateBinding{}).
		MustImportAndCustomize(&Version, v1.ProjectRoleTemplateBinding{}, func(schema *types.Schema) {
			schema.MustCustomizeField("subjectKind", func(field types.Field) types.Field {
				field.Type = "enum"
				field.Options = []string{"User", "Group", "ServiceAccount"}
				field.Nullable = false
				return field
			})
		})
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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