generated from alecodes/base-template
feat: allow to fetch collections
This commit is contained in:
parent
01086d12c9
commit
8c660053e5
7 changed files with 147 additions and 83 deletions
|
|
@ -54,16 +54,3 @@ func (collection *Collection) AddChild(node *Node) error {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Allows to retreive the saved information back into the user struct. This
|
||||
// method will call the [NodeClass.FromNode] of the provided struct.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// data := &Library{}
|
||||
// if err := node.Unmarshall(data); err != nil {
|
||||
// println(err)
|
||||
// }
|
||||
func (collection *Collection) Unmarshall(dst StandardNode) error {
|
||||
return dst.FromNode("COLLECTION", collection.name, collection.metadata)
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue