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

Function NewSchema

schema/schema.go:86–97  ·  view source on GitHub ↗

NewSchema is a constructor for a schema

(id, plural, title, description, singular string)

Source from the content-addressed store, hash-verified

84
85//NewSchema is a constructor for a schema
86func NewSchema(id, plural, title, description, singular string) *Schema {
87 schema := &Schema{
88 ID: id,
89 Title: title,
90 Plural: plural,
91 Description: description,
92 Singular: singular,
93 Extends: []string{},
94 OrderPropertiesBefore: []string{},
95 }
96 return schema
97}
98
99//NewSchemaFromObj is a constructor for a schema by obj
100func NewSchemaFromObj(rawTypeData interface{}) (*Schema, error) {

Callers 1

newSchemaFromObjFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected