MCPcopy Create free account
hub / github.com/cloudwan/gohan / NewSchemaFromObj

Function NewSchemaFromObj

schema/schema.go:100–103  ·  view source on GitHub ↗

NewSchemaFromObj is a constructor for a schema by obj

(rawTypeData interface{})

Source from the content-addressed store, hash-verified

98
99//NewSchemaFromObj is a constructor for a schema by obj
100func NewSchemaFromObj(rawTypeData interface{}) (*Schema, error) {
101 metaschema, _ := GetManager().Schema("schema")
102 return newSchemaFromObj(rawTypeData, metaschema)
103}
104
105func newSchemaFromObj(rawTypeData interface{}, metaschema *Schema) (*Schema, error) {
106 typeData := rawTypeData.(map[string]interface{})

Callers

nothing calls this directly

Calls 3

newSchemaFromObjFunction · 0.85
GetManagerFunction · 0.70
SchemaMethod · 0.65

Tested by

no test coverage detected