Values returns list of values
()
| 85 | |
| 86 | //Values returns list of values |
| 87 | func (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 |
| 98 | func NewResource(schema *Schema, properties map[string]interface{}) (*Resource, error) { |