type YAMLObject … type Parser … // create builds an unvalidated parser. func create(s YAMLObject) (*Parser, error) { … } func createOrDie(schema YAMLObject) *Parser { … } var ssParser … // NewParser will build a YAMLParser from a schema. The schema is validated. func NewParser(schema YAMLObject) (*Parser, error) { … } // TypeNames returns a list of types this parser understands. func (p *Parser) TypeNames() (names []string) { … } // Type returns a helper which can produce objects of the given type. Any // errors are deferred until a further function is called. func (p *Parser) Type(name string) ParseableType { … } type ParseableType … // IsValid return true if p's schema and typename are valid. func (p ParseableType) IsValid() bool { … } // FromYAML parses a yaml string into an object with the current schema // and the type "typename" or an error if validation fails. func (p ParseableType) FromYAML(object YAMLObject, opts ...ValidationOptions) (*TypedValue, error) { … } // FromUnstructured converts a go "interface{}" type, typically an // unstructured object in Kubernetes world, to a TypedValue. It returns an // error if the resulting object fails schema validation. // The provided interface{} must be one of: map[string]interface{}, // map[interface{}]interface{}, []interface{}, int types, float types, // string or boolean. Nested interface{} must also be one of these types. func (p ParseableType) FromUnstructured(in interface{ … } // FromStructured converts a go "interface{}" type, typically an structured object in // Kubernetes, to a TypedValue. It will return an error if the resulting object fails // schema validation. The provided "interface{}" value must be a pointer so that the // value can be modified via reflection. The provided "interface{}" may contain structs // and types that are converted to Values by the jsonMarshaler interface. func (p ParseableType) FromStructured(in interface{ … } var DeducedParseableType …