Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Resource ¶
func Resource(s storage.Storer, resType *core.ResourceType, res *resource.Resource) (core.ResourceTyper, error)
Resource creates a new res of type resType and stores it into s.
This func expects that res was populated according to the given resType (ie. type validation is not performed here).
Commons' attributes, if present, will be ignored and overwritten (with the only exception of ExternalID that if populated will be used).
Attributes whose mutability is "readOnly" will be ignored and removed, other attributes can be written while creation.
If a required attributes is missing an error is returned, with exception of "readOnly" ones whose are just ignored.
Finally, this func expects that uniqueness conflict are handled by storage.Storer
Types ¶
This section is empty.