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

Method Values

schema/resource.go:87–95  ·  view source on GitHub ↗

Values returns list of values

()

Source from the content-addressed store, hash-verified

85
86//Values returns list of values
87func (resource *Resource) Values() []interface{} {
88 var values []interface{}
89 schema := resource.schema
90 data := resource.properties
91 for _, attr := range schema.Properties {
92 values = append(values, data[attr.ID])
93 }
94 return values
95}
96
97//NewResource is a constructor for a resource
98func NewResource(schema *Schema, properties map[string]interface{}) (*Resource, error) {

Callers 1

CreateContextMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected