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

Method SetParentID

schema/resource.go:55–61  ·  view source on GitHub ↗

SetParentID set parent id of the resource

(id string)

Source from the content-addressed store, hash-verified

53
54//SetParentID set parent id of the resource
55func (resource *Resource) SetParentID(id string) {
56 schema := resource.schema
57 if schema.Parent != "" {
58 resource.properties[schema.Parent+"_id"] = id
59 resource.parentID = id
60 }
61}
62
63//Path generate path for this resource
64func (resource *Resource) Path() string {

Callers 2

NewResourceFunction · 0.95
db_test.goFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected