Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for schemaFor (0.14 sec)

  1. pilot/pkg/config/aggregate/config_test.go

    	store1 := memory.Make(collection.SchemasFor(schemaFor("SomeConfig", "broken message name")))
    
    	stores := []model.ConfigStore{store1}
    
    	store, err := makeStore(stores, nil)
    	g.Expect(err).To(MatchError(ContainSubstring("not found: broken message name")))
    	g.Expect(store).To(BeNil())
    }
    
    func TestAggregateStoreGet(t *testing.T) {
    	g := NewWithT(t)
    
    	store1 := memory.Make(collection.SchemasFor(collections.GatewayClass))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 02 17:36:47 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  2. platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/accessors/tasks/PrintAccessors.kt

        private
        val schema = Cached.of { schemaOf(project) }
    
        @Suppress("unused")
        @TaskAction
        internal
        fun printExtensions() {
            printAccessorsFor(schema.get()!!)
        }
    
        private
        fun schemaOf(project: Project) =
            projectSchemaProvider.schemaFor(project)
    }
    
    
    internal
    fun printAccessorsFor(schema: TypedProjectSchema) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 01 13:09:45 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  3. platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/accessors/ProjectSchemaProvider.kt

    import org.gradle.internal.service.scopes.ServiceScope
    import org.gradle.kotlin.dsl.*
    import java.io.Serializable
    
    
    @ServiceScope(Scope.UserHome::class)
    interface ProjectSchemaProvider {
    
        fun schemaFor(scriptTarget: Any): TypedProjectSchema?
    }
    
    
    data class SchemaType(val value: TypeOf<*>) {
    
        companion object {
            inline fun <reified T> of() = SchemaType(typeOf<T>())
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 01 13:09:46 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  4. pilot/pkg/model/config_test.go

    		}
    	}
    	return nil, false
    }
    
    func schemaFor(kind, proto string) resource.Schema {
    	return resource.Builder{
    		Kind:   kind,
    		Plural: kind + "s",
    		Proto:  proto,
    	}.BuildNoValidate()
    }
    
    func TestConfigDescriptor(t *testing.T) {
    	a := schemaFor("a", "proxy.A")
    	schemas := collection.SchemasFor(
    		a,
    		schemaFor("b", "proxy.B"),
    		schemaFor("c", "proxy.C"))
    	want := []string{"a", "b", "c"}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 20 12:54:10 UTC 2023
    - 19K bytes
    - Viewed (0)
  5. pilot/pkg/model/conversion_test.go

    			},
    		},
    		"subsets": []any{
    			map[string]any{
    				"name": "foo",
    				"labels": map[string]any{
    					"test": "label",
    				},
    			},
    		},
    	}
    
    	badSchema := schemaFor("bad", "bad-name")
    	if _, err := crd.FromYAML(badSchema, wantYAML); err == nil {
    		t.Errorf("FromYAML should have failed using Schema with bad MessageName")
    	}
    
    	gotJSON, err := protomarshal.ToJSON(msg)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 02 20:50:14 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  6. platforms/core-configuration/kotlin-dsl-provider-plugins/src/main/kotlin/org/gradle/kotlin/dsl/provider/plugins/DefaultProjectSchemaProvider.kt

    import org.gradle.kotlin.dsl.accessors.TypedProjectSchema
    import java.lang.reflect.Modifier
    import kotlin.reflect.KVisibility
    
    
    class DefaultProjectSchemaProvider : ProjectSchemaProvider {
    
        override fun schemaFor(scriptTarget: Any): TypedProjectSchema? =
            targetTypeOf(scriptTarget)
                ?.let { scriptTargetType ->
                    targetSchemaFor(
                        scriptTarget,
                        scriptTargetType
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 01 13:09:46 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  7. platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/accessors/AccessorsClassPath.kt

            require(classLoaderScope.isLocked) {
                "project.classLoaderScope must be locked before querying the project schema"
            }
            return projectSchemaProvider.schemaFor(scriptTarget)?.takeIf { it.isNotEmpty() }
        }
    }
    
    
    internal
    class GenerateProjectAccessors(
        private val scriptTarget: Any,
        private val scriptTargetSchema: TypedProjectSchema,
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 05 20:25:05 UTC 2024
    - 22K bytes
    - Viewed (0)
  8. platforms/core-configuration/kotlin-dsl-provider-plugins/src/main/kotlin/org/gradle/kotlin/dsl/provider/plugins/precompiled/tasks/GeneratePrecompiledScriptPluginAccessors.kt

                        rootProject.run {
                            applyPlugins(plugins)
                            serviceOf<ProjectSchemaProvider>().schemaFor(this)!!
                        }
                    }
                }
            }
        }
    
        private
        fun projectSchemaBuildStartParameterFor(projectDir: File): ProjectSchemaBuildStartParameter =
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 18 08:10:49 UTC 2024
    - 24.8K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/cel/openapi/resolver/refs.go

    	rootSchema, ok := schemaOf(rootRef)
    	visitedRefs.Insert(rootRef)
    	if !ok {
    		return nil, fmt.Errorf("internal error: cannot resolve Ref for root schema %q: %w", rootRef, ErrSchemaNotFound)
    	}
    	return populateRefs(schemaOf, visitedRefs, rootSchema)
    }
    
    func populateRefs(schemaOf func(ref string) (*spec.Schema, bool), visited sets.Set[string], schema *spec.Schema) (*spec.Schema, error) {
    	result := *schema
    	changed := false
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 17:23:50 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  10. pkg/config/schema/collection/schemas_test.go

    func TestSchemas_Remove(t *testing.T) {
    	g := NewWithT(t)
    
    	schemas := collection.SchemasFor(emptyResource, structResource)
    	g.Expect(schemas.Remove(structResource)).To(Equal(collection.SchemasFor(emptyResource)))
    	g.Expect(schemas.Remove(emptyResource, structResource)).To(Equal(collection.SchemasFor()))
    	g.Expect(schemas).To(Equal(collection.SchemasFor(emptyResource, structResource)))
    }
    
    func TestSchemas_Add(t *testing.T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 5.4K bytes
    - Viewed (0)
Back to top