create

package
v0.0.0-...-47ace37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2018 License: MIT Imports: 11 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL