NewNamespace is a constructor for a namespace
(raw interface{})
| 45 | |
| 46 | // NewNamespace is a constructor for a namespace |
| 47 | func NewNamespace(raw interface{}) (*Namespace, error) { |
| 48 | typeData := raw.(map[string](interface{})) |
| 49 | namespace := &Namespace{} |
| 50 | namespace.ID, _ = typeData["id"].(string) |
| 51 | namespace.Prefix, _ = typeData["prefix"].(string) |
| 52 | namespace.Parent, _ = typeData["parent"].(string) |
| 53 | return namespace, nil |
| 54 | } |
| 55 | |
| 56 | // SetParentNamespace sets a parent of a namespace to the provided one |
| 57 | func (namespace *Namespace) SetParentNamespace(parent *Namespace) { |
no outgoing calls
no test coverage detected