// // This file is generated by grafana-app-sdk // DO NOT EDIT // package apis import ( "fmt" "github.com/grafana/grafana-app-sdk/app" "github.com/grafana/grafana-app-sdk/resource" v0alpha1 "github.com/grafana/grafana/apps/iam/pkg/apis/iam/v0alpha1" ) var appManifestData = app.ManifestData{ AppName: "iam", Group: "iam.grafana.app", Kinds: []app.ManifestKind{ { Kind: "GlobalRole", Scope: "Namespaced", Conversion: false, Versions: []app.ManifestKindVersion{ { Name: "v0alpha1", }, }, }, { Kind: "GlobalRoleBinding", Scope: "Namespaced", Conversion: false, Versions: []app.ManifestKindVersion{ { Name: "v0alpha1", }, }, }, { Kind: "CoreRole", Scope: "Namespaced", Conversion: false, Versions: []app.ManifestKindVersion{ { Name: "v0alpha1", }, }, }, { Kind: "Role", Scope: "Namespaced", Conversion: false, Versions: []app.ManifestKindVersion{ { Name: "v0alpha1", }, }, }, { Kind: "RoleBinding", Scope: "Namespaced", Conversion: false, Versions: []app.ManifestKindVersion{ { Name: "v0alpha1", }, }, }, { Kind: "ResourcePermission", Scope: "Namespaced", Conversion: false, Versions: []app.ManifestKindVersion{ { Name: "v0alpha1", }, }, }, }, } func LocalManifest() app.Manifest { return app.NewEmbeddedManifest(appManifestData) } func RemoteManifest() app.Manifest { return app.NewAPIServerManifest("iam") } var kindVersionToGoType = map[string]resource.Kind{ "GlobalRole/v0alpha1": v0alpha1.GlobalRoleKind(), "GlobalRoleBinding/v0alpha1": v0alpha1.GlobalRoleBindingKind(), "CoreRole/v0alpha1": v0alpha1.CoreRoleKind(), "Role/v0alpha1": v0alpha1.RoleKind(), "RoleBinding/v0alpha1": v0alpha1.RoleBindingKind(), "ResourcePermission/v0alpha1": v0alpha1.ResourcePermissionKind(), } // ManifestGoTypeAssociator returns the associated resource.Kind instance for a given Kind and Version, if one exists. // If there is no association for the provided Kind and Version, exists will return false. func ManifestGoTypeAssociator(kind, version string) (goType resource.Kind, exists bool) { goType, exists = kindVersionToGoType[fmt.Sprintf("%s/%s", kind, version)] return goType, exists }